Type: php
header
WP Multisite Debug (Front End)
/** * Multisite Snippet Debug Badge (Front-end + Admin) * – Shows a visible badge proving the snippet is executing on that site * – Includes blog/site IDs + domain for quick verification * * Add as a WPCode snippet.…Continue reading
CASD / CAPF Main PHP
// Project form – First field dynamic (ID = 100) add_filter( ‘gform_pre_render’, ‘byus_populate_aap_select_field’ ); add_filter( ‘gform_pre_validation’, ‘byus_populate_aap_select_field’ ); add_filter( ‘gform_pre_submission_filter’, ‘byus_populate_aap_select_field’ ); add_filter( ‘gform_admin_pre_render’, ‘byus_populate_aap_select_field’ ); function byus_populate_aap_select_field( $form ) { $aap_mode_enabled = get_field( ‘aap_mode_enabled’, ‘option’ ); $current_aap = get_field(…Continue reading
What Shortcodes Can I Use in Advanced Gift Cards for WooCommerce?
[agcfw_gift_card_redeem_form]Continue reading
How to Use the Total Customer Spend Cart Condition (snippet 1)
Total Customer SpendContinue reading
How to Use the Total Customer Spend Cart Condition (snippet 3)
Total Customer Spend On A Certain CategoryContinue reading
How to Apply Coupon Coupon Based On Cart Item Meta
// define the woocommerce_after_cart callback function action_woocommerce_after_cart() { error_log(print_r(WC()->cart->get_cart_contents(), true)); }; // add the action add_action( ‘woocommerce_after_cart’, ‘action_woocommerce_after_cart’, 10, 1 );Continue reading
How to Restrict Coupons to a Certain User?
add_filter(‘acfwp_allowed_customers_error_message’,’Change_Text’); function Change_Text(){ return __( ‘Hey! You did not meet the requirements, reach out to us!.’); }Continue reading
Can You Add More Product Types To The Product Search Boxes?
add_filter( ‘acfw_product_search_allowed_types’ , ‘support_booking_product_type_in_search’ ); function support_booking_product_type_in_search( $allowed_types ) { $allowed_types[] = ‘booking’; $allowed_types[] = ‘bundle’; $allowed_types[] = ‘composite’; return $allowed_types; }Continue reading