public function process_split_payment( $order ) { $vendors_due = WCV_Vendors::get_vendor_dues_from_order( $order, false ); $sub_accounts = array(); foreach ( $vendors_due as $vendor_id => $products ) { $_vendor_account = get_user_meta( $vendor_id, ‘_paystack_sub_account_code’, true ); $sub_accounts[] = array( ‘subaccount’ => $_vendor_account, ‘share’ => $calculated_share,…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
/* Plugin Name: WC Vídeo na Capa do Produto (Flatsome Ready) Description: Substitui a imagem principal do produto por um vídeo local (MP4/WebM/GIF) no WooCommerce, compatível com Flatsome. Mostra também no catálogo/listagem com autoplay por visibilidade (60%). Version: 1.2.1 Author:…Continue reading
/* Zaa summary */ .product-footer .zaa-stl-wrapper .zaa-summary{ padding-left:0px !important; border-left-style:none !important; transform:translatex(0px) translatey(0px); } /* Zaa buy */ .zaa-stl-wrapper .zaa-summary .zaa-buy-btn{ min-width:10px !important; } /* Zaa buy */ #wrapper #main .shop-container .product .product-container .product-footer .container .zaa-stl-wrapper .zaa-summary .zaa-buy-btn{ width:100% !important;…Continue reading
if ( ! function_exists( ‘rd_currency_switcher_shortcode’ ) ) { function rd_currency_switcher_shortcode( $atts ) { if ( ! function_exists( ‘wc_get_currency_switcher_markup’ ) ) { return ”; } // Attributes (defaults) $atts = shortcode_atts( array( ‘flag’ => ‘true’, ‘symbol’ => ‘true’, ‘select_border’ => ‘true’,…Continue reading