Override MemberPress IPN Check
add_filter(‘mepr_override_ipn_is_for_me’, function () { return true; });Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter(‘mepr_override_ipn_is_for_me’, function () { return true; });Continue reading
/**************************************/ /* Allow HTML entities in text editor */ /**************************************/ function dmcg_allow_nbsp_in_tinymce( $init ) { $init[‘entities’] = ‘160,nbsp,38,amp,60,lt,62,gt,173,shy’; $init[‘entity_encoding’] = ‘named’; return $init; } add_filter( ‘tiny_mce_before_init’, ‘dmcg_allow_nbsp_in_tinymce’ ); /*************************************************/ /* Disable Gutenberg Editor (use Classic Editor) */ /*************************************************/ add_filter(‘gutenberg_can_edit_post’, ‘__return_false’,…Continue reading
function wc_register_guests( $order_id ) { // get all the order data $order = new WC_Order($order_id); //get the user email from the order $order_email = $order->billing_email; // check if there are any users with the billing email as user or email…Continue reading
add_filter( ‘woocommerce_product_add_to_cart_text’, function( $text ) { if ( ‘Add to cart’ == $text ) { $text = __( ‘Buy Now’, ‘woocommerce’ ); } return $text; } );Continue reading
add_filter( ‘gettext’, ‘customizing_product_variation_message’, 10, 3 ); function customizing_product_variation_message( $translated_text, $untranslated_text, $domain ) { if ($untranslated_text == ‘Select options’) { $translated_text = __( ‘Buy Now’, $domain ); } if ($untranslated_text == ‘Select options’) { $translated_text = __( ‘Buy Now’, $domain );…Continue reading
/** * Add Continue Shopping Button on Cart Page * Add to theme functions.php file or Code Snippets plugin */ add_action( ‘woocommerce_before_cart_table’, ‘woo_add_continue_shopping_button_to_cart’ ); function woo_add_continue_shopping_button_to_cart() { $shop_page_url = get_permalink( woocommerce_get_page_id( ‘shop’ ) ); echo ‘ ‘; echo ‘ Continue…Continue reading
/** * Rename product data tabs */ add_filter( ‘woocommerce_product_tabs’, ‘woo_rename_tabs’, 98 ); function woo_rename_tabs( $tabs ) { $tabs[‘additional_information’][‘title’] = __( ‘Product Info’ ); // Rename the additional information tab return $tabs; }Continue reading
add_filter(‘https_ssl_verify’, ‘__return_false’);Continue reading
add_filter( ‘woocommerce_product_add_to_cart_text’, function( $text ) { if ( ‘Read more’ == $text ) { $text = __( ‘Buy Now’, ‘woocommerce’ ); } return $text; } );Continue reading
/** * Add a custom product data tab */ add_filter( ‘woocommerce_product_tabs’, ‘woo_new_product_tab’ ); function woo_new_product_tab( $tabs ) { // Adds the new tab $tabs[‘test_tab’] = array( ‘title’ => __( ‘Shipping Info’, ‘woocommerce’ ), ‘priority’ => 50, ‘callback’ => ‘woo_new_product_tab_content’ );…Continue reading