add_filter( ‘mepr-can-you-buy-me-override’, function( $override, $product ) { // Check if the user is on the MemberPress Account page if ( !is_page( ‘account’ ) ) { return $override; } // Get the current user and their active memberships $user = MeprUtils::get_currentuserinfo();…Continue reading
add_action(‘wp_footer’, function() { if (is_singular(‘memberpressproduct’)) { echo ‘ ‘ . get_the_title() . ‘ ‘; ?>Continue reading
Add_filter(‘woocommerce_package_rates’, ‘wf_sort_shipping_methods’, 10, 2); function wf_sort_shipping_methods($available_shipping_methods, $package) { // Arrange shipping methods as per your requirement $sort_order = array( ‘wf_shipping_ups’ => array(), ‘wf_shipping_usps’ => array(), ‘free_shipping’ => array(), ‘local_pickup’ => array(), ‘legacy_flat_rate’ => array(), ); // unsetting all methods that…Continue reading
Add_filter(‘woocommerce_package_rates’, ‘wf_sort_shipping_methods’, 10, 2); function wf_sort_shipping_methods($available_shipping_methods, $package) { // Arrange shipping methods as per your requirement $sort_order = array( ‘wf_shipping_ups’ => array(), ‘wf_shipping_usps’ => array(), ‘free_shipping’ => array(), ‘local_pickup’ => array(), ‘legacy_flat_rate’ => array(), ); // unsetting all methods that…Continue reading
add_filter(‘mepr-vat-countries’, function($countries) { unset($countries[‘GB’]); return $countries; });Continue reading