Untitled Snippet
LiceLicense key NB43HKACOWMY7PCUB se keyContinue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
LiceLicense key NB43HKACOWMY7PCUB se keyContinue reading
if ( ! function_exists( ‘rd_swap_products_on_subscription’ ) ) { function rd_swap_products_on_subscription( $workflow ) { // Map old SKU => new SKU (simple products only; untested with variable/bundled) $sku_mapping = array( ‘9359769001492’ => ‘9359769002352’, // AF Nando’s Chicken & Rice > Spicy…Continue reading
if ( wc_string_to_bool( get_option( ‘wcvendors_vendor_give_taxes’ ) ) ) { // Add tax fees to vendor total } else { // Add tax total to marketplace split } if ( wc_string_to_bool( get_option( ‘wcvendors_vendor_give_shipping’ ) ) { // Add shipping fees to…Continue reading
update_user_meta( $user->ID, ‘_paystack_sub_account_code’, ‘ACCT_xxxxxxxxxxxxx’ );Continue reading
function themify_fix_agcfw_variable_product_scripts() { // Only run on single product pages if ( ! is_product() ) { return; } // Only run if Themify theme is active if ( ! class_exists( ‘Themify_Enqueue_Assets’ ) ) { return; } // Only run if…Continue reading
/** * Hide Price & Add to Cart for Non Logged in Users for Specific Products */ function is_non_purchasable_products_for_visitors( $product ) { $not_purchasable_products = array( 23, 22 ); // Replace with Products ID you want to set as non purchasable…Continue reading
// This code runs every time the page is opened/reloaded $visits = 1; if (isset($_COOKIE[‘visits’])) { $visits = (int)$_COOKIE[‘visits’] + 1; } setcookie(‘visits’, $visits, time() + (86400 ), “/”); // Cookie lasts 1 days if ( ! defined( ‘EMAIL_SENT_PAGE_410’ )…Continue reading