Maintenance mode just for WooCommerce shop pages [closed]

You can add this snippet below to your themes functions file to create the message you want displayed. (For all Woocommerce conditional options, visit their codex here: http://docs.woothemes.com/document/conditional-tags/) add_filter (‘the_content’, ‘royal_woocommerce_maintenance’); function royal_woocommerce_maintenance($content) { if( is_woocommerce() or is_shop() or is_product_category() or is_product() or is_cart() or is_checkout() or is_account_page() ) { $content.= ‘<div style=”border:1px dotted #000; … Read more

Woocommerce hook on address field change [closed]

There is a similar question on StackOverflow, check the answer there. Hope this will help you. Here is the code you can use: add_filter( ‘woocommerce_checkout_fields’ , ‘custom_override_checkout_fields’ ); function custom_override_checkout_fields( $fields ) { $fields[‘shipping’][‘custom_field’] = array( ‘label’ => ‘Custom field’, ‘required’ => 1, ‘class’ => array (‘address-field’, ‘update_totals_on_change’ ) ); return $fields; } Basically what … Read more

WooCommerce Hook: Content get’s displayed twice and not AFTER the order total

In case it helps anyone, the do_action(‘woocommerce_review_order_after_order_total’) is called in the middle of a table in the template and expects a table row to be echoed by the add_action hook. If you just echo text or, as in the question, an input, it falls outside the table, appears before not after the table and presumably … Read more

woocommerce axios react

I was having the same issue with Woocommerce Oauth 1.0 authentication and this solution worked for me. I’m running it on localhost, so far so good. Edit: Let me elaborate this answer a bit more. I just started learning React last night and the best way to learn is by doing. I’ll explain as a … Read more