Create Woo Store Total Stock Count Shortcodes & Action Hooks
if (!function_exists(‘rd_wc_round_down_step’)) { function rd_wc_round_down_step(int $value, int $step): int { if ($stepContinue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
if (!function_exists(‘rd_wc_round_down_step’)) { function rd_wc_round_down_step(int $value, int $step): int { if ($stepContinue reading
if (!function_exists(‘rd_wc_customer_count_get’)) { function rd_wc_customer_count_get(array $args = array()): int { if (!function_exists(‘WC’)) { return 0; } global $wpdb; $defaults = array( ‘scope’ => ‘all’, ‘registered_only’ => false, ‘roles’ => array(‘customer’), ‘require_role’ => false, ); $args = array_merge($defaults, $args); $scope =…Continue reading
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
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