Midwest Dev Chat

MidwestDevChat.com

  • The newest 15 messages in the super-cool #wordpress channel.

  • 09/11 10:16:05 Cyrstal: I’m overriding it using the `template_include` filter
  • 09/11 10:16:14 Cyrstal: which I thought was right… should put it in the right oder anyway
  • 09/11 10:16:21 Cyrstal: that’s a good thought though.
  • 09/11 10:16:42 Cyrstal: because I can just run `get_sidebar` this is actually not an issue anymore… I didn’t realize I could do that until I started digging and gave it a whirl
  • 09/11 10:17:13 Cyrstal: but it’s still confounding as to why it would not run
  • 09/11 10:18:46 Kathline: What happens if you switch out the `get_sidebar()` with `wc_get_template( 'global/sidebar.php' );` `woocommerce_sidebar` calls `woocommerce_get_sidebar` ( callback ) which calls the above, and in that template file itself it calls `get_sidebar()`.
  • 09/11 10:21:57 Kathline: I would think it's all using `wc_get_template()` (https://docs.woocommerce.com/wc-apidocs/source-...) but maybe looking at that code will be of some help. It does suggest using `wc_get_template` hook to change the template.
  • 09/11 10:41:12 Cyrstal: yeah possibly
  • 09/11 10:41:59 Cyrstal: that works
  • 09/11 10:42:10 Cyrstal: the `wc_get_template` call, I mean
  • 09/11 10:42:44 Cyrstal: even `woocommerce_get_sidebar()` works
  • 09/11 10:42:55 Cyrstal: just not the action
  • 09/11 10:54:52 Cyrstal: I think I’m going to use the `get_sidebar('shop')` call
  • 09/11 10:55:00 Cyrstal: as that seems to be the canonical or preferred way
  • 09/11 10:57:21 Kathline: Well, if you're copying over _all_ the woo template files, it may be better to call the template file in `global/` which already calls `get_sidebar()`. But yeah if it works it works. If I know more about why that `do_action()` doesn't seem to work i'll let ya know!
  • *Usernames have been changed to protect the innocent.
We're currently 971 members strong. Join us!
Request Invite

Check out all the cool channels!

Join the conversation!