woocommerce_checkout_order_processed hook executing function twice
woocommerce_checkout_order_processed hook executing function twice
woocommerce_checkout_order_processed hook executing function twice
Not quite the solution I was expecting, but I found another plugin that handles Service Worker much better and adds the features I needed, though I have to list posts manually rather than programmatically. The better plugin is Above The Fold Optimization (ignore the 1 star reviews, it’s one of those plugins where if you … Read more
Fixed and here’s how, please excuse the unedited cut and paste, thanks to @mmm for the pointers on how: Add Custom Post Type via Action add_action(‘init’, array($this, ‘mactrak_custom_post_type_add’)); Above function as called (mactrak_custom_post_type_add) includes argument to set up meta box and menu position Following construct: add_action(‘admin_menu’, array(&$this,’mactrak_admin_menu’)); runs following script: add_menu_page( ‘MacTrak – the WP … Read more
If you want to add items dynamically at every page call, you can look this answer : Dynamically add sub-categories to any category in the menu And to add an element directly, you can try that for a custom link e.g. : // create the new element $post = [ ‘post_title’ => “StackExchange ” . … Read more
You have to tell WP that archive.php should apply to your custom post type as well as it’s other defaults. You can use pre_get_posts filter to do this, be sure to research this well before using it as there is a right and wrong way to use this filter. For example, try: function add_custom_post_type_to_archiving( $query … Read more
Edit Images From the Front End without Access to WP Admin
Secure REST with nonce works only when not logged
I ended up doing it in what I would consider a sloppy way. On the init hook I check the WooCommerce template against my custom template and if the WooCommerce template does not match my template then I replace the WooCommerce template with my template. add_action( ‘init’, ‘run_inital’ ); function run_inital(){ $wooThemePath = $woocommerce->plugin_path().”/templates/myaccount/dashboard.php”; $myThemeFile … Read more
CMB2 Form Throws No Input File Specified in custom WordPress Plugin
Build a translation correcter plugin