Replace plugin HTML to single text using hooks
Replace plugin HTML to single text using hooks
Replace plugin HTML to single text using hooks
I’ve received my answer from Woocommerce support. It’s working like a charm: add_action( ‘after_setup_theme’, ‘my_stop_cancelled_restock’, 0 ); function my_stop_cancelled_restock() { remove_action(‘woocommerce_order_status_cancelled’, ‘wc_maybe_increase_stock_levels’); }
Enqueue assets from multiple directories using add_action/do_action
When moving a webflow designed site over to WordPress you must put the wf-data info in the header of your WordPress design. The wf-data code will call out specific interactions within your webflow.js. I also call out my CSS in the head of every custom post type template – so if my custom post type … Read more
Changing header logo href for the checkout page
Hook to add content after date in post?
wp_loaded would fire too early – you can’t remove a hook before it’s been added. I’d try adding your own hook with a higher priority, at the same level as the parent’s hook. That is, not inside an action. add_filter( ‘preprocess_comment’ , ‘my_preprocess_comment_function’, 5 ); Then within your function, remove the parent function: function my_preprocess_comment_function( … Read more
Update main post with same category when creating custom post to update the modified date
Because in functions.php, it is too early to just run the print_r(), you may run it within a init hook like this: Placing it inside theme’s functions.php add_action( ‘init’, ‘test_trace’ ); function test_trace() { global $post; print_r($post); }
I found the culprit. I had to change the nonce check in save_custom_post_type() to: if ( !isset( $_POST[‘metabox_nonce’] ) || !wp_verify_nonce( $_POST[‘metabox_nonce’], basename( __FILE__ ) ) ) { return $post_id; }