// Create and display the custom field in product general setting tab add_action( ‘woocommerce_product_options_general_product_data’, ‘add_custom_field_general_product_fields’ ); function add_custom_field_general_product_fields(){ global $post; echo ‘ ‘; // Custom Product Checkbox Field woocommerce_wp_checkbox( array( ‘id’ => ‘_disabled_for_coupons’, ‘label’ => __(‘Disabled for coupons’, ‘woocommerce’), ‘description’…Continue reading
add_filter(‘woo_wallet_is_enable_top_up’, ‘__return_false’);Continue reading
/** * This will turn on deferred transactional emails in WooCommerce. This may help if you * are experiencing slow checkouts or checkout timeouts. */ add_filter( ‘woocommerce_defer_transactional_emails’, ‘__return_true’ );Continue reading
function ts_add_description_field_to_shipping_method( $fields ) { $fields[‘short_description’] = array( ‘title’ => __( ‘Short Description’, ‘woocommerce’ ), ‘type’ => ‘textarea’, ‘description’ => __( ‘Add a short description for this shipping method.’, ‘woocommerce’ ), ‘default’ => ”, ‘desc_tip’ => true, ); return $fields;…Continue reading
add_filter( ‘woocommerce_disable_password_change_notification’, ‘__return_true’ );Continue reading
add_filter(‘bwfan_enable_twilio_advanced_settings’, ‘__return_true’);Continue reading
add_filter( ‘bos_use_regular_price’, function( $use_regular_price ) { // If the return is false, it will use the Sale Price, if any. If not it will use the Regular Price. // If the return is true, it will use only the Regular…Continue reading
// Cron event add_action(‘init’, function () { if (!wp_next_scheduled(‘tune_hourly_coupon_import’)) { wp_schedule_event(time(), ‘hourly’, ‘tune_hourly_coupon_import’); } // Optional: manual trigger for testing if (isset($_GET[‘import_tune_coupons’]) && $_GET[‘import_tune_coupons’] === ‘1’) { tune_import_coupons_from_tune(); } }); add_action(‘tune_hourly_coupon_import’, ‘tune_import_coupons_from_tune’); function tune_import_coupons_from_tune() { if (!function_exists(‘wc_get_coupon_id_by_code’)) return; $network_token =…Continue reading
add_filter( ‘bwfan_broadcast_sms_per_second_limit’, function () { return 10; } );Continue reading
add_action(‘save_post_shop_coupon’, function($post_id, $post, $update) { if (wp_is_post_revision($post_id) || wp_is_post_autosave($post_id)) { return; } if ($post->post_type !== ‘shop_coupon’) { return; } if ($post->post_status !== ‘publish’ && $post->post_status !== ‘draft’ && $post->post_status !== ‘pending’) { return; } if (get_post_meta($post_id, ‘_tune_imported’, true)) { return;…Continue reading