Archives: Snippets
Untitled Snippet
Untitled Snippet
Remove the coupon section for orders that did not use any coupon.
add_action( ‘woocommerce_email_before_order_table’, ‘conditionally_remove_coupon_section_from_email’, 5, 4 ); function conditionally_remove_coupon_section_from_email( $order, $sent_to_admin, $plain_text, $email ) { if ( ! $order instanceof WC_Order ) { return; } // Get applied coupons $coupons = $order->get_coupon_codes(); // If NO coupons were used, remove the coupon…Continue reading
Lawyer in Martin County – LegalService Schema
Untitled Snippet
PositiveSSL Footer Badge Script
Membership Details Table Override
/** * Membership Details Table Override * * Child Theme: Storefront-Child-Theme * WC Vendors Membership Template * * Hides certain rows for free plans while keeping table formatting. */ if ( ! defined( ‘ABSPATH’ ) ) { exit; // Exit…Continue reading
Paystack Split Payments Integration with WC Vendors — Creating the Split Configuration
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