Sending Email upon registration

For account moderation (allow login only after email verification), there are lots of plugin, you can try Theme My Login, it has moderation option. For using your email address as sender, there are two ways, if you want to send VIA SMTP server you can use any SMTP plugin like Easy WP SMTP or any … Read more

Conditional action hook

Woocommerce adds the action hook at priority order 30. add_action(‘woocommerce_single_product_summary’,’woocommerce_template_single_add_to_cart’,30); So, You may have done remove_action(‘woocommerce_single_product_summary’,’woocommerce_template_single_add_to_cart’,30); to remove the action from the hook. To remove an action the priority must match the priority with with the function was originally added. Now you can do function add_cart_button(){ global $product; $id = $product->get_id(); if($id != 1345 ): … Read more

Change “Select Options” label in button to “Buy Now!” in store page

add_filter( ‘woocommerce_product_single_add_to_cart_text’, ‘wpse_woo_custom_cart_button_text’ ); add_filter( ‘woocommerce_product_add_to_cart_text’, ‘wpse_woo_custom_cart_button_text’ ); function wpse_woo_custom_cart_button_text() { global $product; $product_type = $product->get_type(); // To modify on a single product page if( $product_type == ‘variable-subscription’ || $product_type == ‘variable’ ){ if( is_single() ) return __( ‘Buy Now’, ‘my-textdomain’ ); else return __( ‘Choose options’, ‘my-textdomain’ ); } // To modify on the … Read more