/** * Fix 1: Product page — prevent WWPP from overriding the quantity input args for * WC Product Bundle child items. * * WC Product Bundles names bundled item quantity fields ‘bundle_quantity_{id}’. * We capture WC PB’s intended args…Continue reading
add_filter( ‘woocommerce_add_cart_item_data’, function( $cart_item_data, $product_id ) { $og_channel = get_post_meta( $product_id, ‘og_channel’, true ); if ( $og_channel ) { $cart_item_data[‘og_channel’] = $og_channel; } return $cart_item_data; }, 10, 2 );Continue reading
add_filter( ‘woocommerce_coupon_validate_minimum_amount’, function ( $is_invalid, $coupon, $subtotal ) { if ( ! $is_invalid ) { return $is_invalid; } $bogo_deals = get_post_meta( $coupon->get_id(), ‘_acfw_bogo_deals’, true ); if ( empty( $bogo_deals ) ) { return $is_invalid; } $pre_bogo_subtotal = 0.0; foreach (…Continue reading
function shortcode_pods_universel($atts) { // 1. Définition des arguments $args = shortcode_atts(array( ‘name’ => ”, // Nom de votre page d’options Pods ‘template’ => ”, // Nom du template de mise en page ‘futur’ => ”, // Nom du champ date…Continue reading
add_action(‘init’, function () { $extensions = [ ‘woocommerce/woocommerce.php’, ‘woo-payments/woocommerce-payments.php’, ‘woocommerce-paypal-payments/woocommerce-paypal-payments.php’, ‘woocommerce-tax/woocommerce-tax.php’, ‘google-listings-and-ads/google-listings-and-ads.php’, // si installé ‘kliken-marketing/kliken-marketing.php’, // marketing Woo ]; foreach ($extensions as $extension) { if (!is_plugin_active($extension) && file_exists(WP_PLUGIN_DIR . ‘/’ . $extension)) { activate_plugin($extension); } } });Continue reading
add_action(‘init’, function () { $extensions = [ ‘woocommerce/woocommerce.php’, ‘woo-payments/woocommerce-payments.php’, ‘woocommerce-paypal-payments/woocommerce-paypal-payments.php’, ‘woocommerce-tax/woocommerce-tax.php’, ‘google-listings-and-ads/google-listings-and-ads.php’, // si installé ‘kliken-marketing/kliken-marketing.php’, // marketing Woo ]; foreach ($extensions as $extension) { if (!is_plugin_active($extension) && file_exists(WP_PLUGIN_DIR . ‘/’ . $extension)) { activate_plugin($extension); } } });Continue reading
/** * Prevent publishing posts under a minimum number of words. * * @param int $post_id The id of the post. * @param WP_Post $post The post object. * * @return void */ function wpcode_snippet_publish_min_words( $post_id, $post ) { //…Continue reading