php snippet not working
-
I have the following php snippet I want to use for my site. If I add the snippet directly to the theme functions.php file, the snippet works fine but if I add it to my install of WPCode Lite it doesn’t work. I have other php snippets I have added to WPCode Lite that work fine so I’m not sure why this one won’t work.
the code:
add_action( 'woocommerce_order_status_processing_to_on-hold', 'enable_processing_to_on_hold_notification', 10, 2 ); function enable_processing_to_on_hold_notification( $order_id, $order ){ // Getting all WC_emails array objects $mailer = WC()->mailer()->get_emails(); // Send the "On Hold" notification $mailer['WC_Email_Customer_On_Hold_Order']->trigger( $order_id ); }
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘php snippet not working’ is closed to new replies.