Midwest Dev Chat


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

  • 09/11 10:16:05 Rosena: I’m overriding it using the `template_include` filter
  • 09/11 10:16:14 Rosena: which I thought was right… should put it in the right oder anyway
  • 09/11 10:16:21 Rosena: that’s a good thought though.
  • 09/11 10:16:42 Rosena: 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 Rosena: but it’s still confounding as to why it would not run
  • 09/11 10:18:46 Penelope: 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 Penelope: 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 Rosena: yeah possibly
  • 09/11 10:41:59 Rosena: that works
  • 09/11 10:42:10 Rosena: the `wc_get_template` call, I mean
  • 09/11 10:42:44 Rosena: even `woocommerce_get_sidebar()` works
  • 09/11 10:42:55 Rosena: just not the action
  • 09/11 10:54:52 Rosena: I think I’m going to use the `get_sidebar('shop')` call
  • 09/11 10:55:00 Rosena: as that seems to be the canonical or preferred way
  • 09/11 10:57:21 Penelope: 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 972 members strong. Join us!
Request Invite

Check out all the cool channels!

Join the conversation!