function wpf_tags_body_class( $classes ) { if ( ! function_exists( ‘wp_fusion’ ) ) { return $classes; } if( ! wpf_is_user_logged_in() || wpf_admin_override() ) { return $classes; } $tags = wp_fusion()->user->get_tags(); if( ! empty( $tags ) ) { foreach( $tags as $tag_id…Continue reading
add_filter( ‘sptb_frequency_change_next_payment’, function( $bool, $user_id, $subscription ) { return false; }, 10, 3 );Continue reading
/** * Change wording of next payment date changed confirmation message via Toolbox for Subscriptions plugin from ‘shipment’ to ‘payment’ **/ add_filter( ‘jgtb_date_renewal_successful_message’, function( $message, $subscription ) { return ‘Next payment date has been successfully updated.’; }, 10, 2 );…Continue reading
add_filter( ‘jgtb_change_intervals’, function( $intervals, $subscription ) { foreach ( $intervals as $key => $interval ) { if ( ! in_array( $key, array( 1, 2 ) ) ) { // Numbers indicate which option (1 means weekly, 2 means every 2nd…Continue reading
add_shortcode(‘papa_macros_discount_message’, ‘papa_macros_discount_message_shortcode’); function papa_macros_discount_message_shortcode() { if ( ! function_exists(‘WC’) || ! WC()->cart ) { return ”; } $cart = WC()->cart; $manual_subtotal = 0; foreach ( $cart->get_cart() as $item ) { if ( ! isset($item[‘data’]) || ! is_object($item[‘data’]) ) continue; $price…Continue reading
/** * Fix: WPForms Prefill by URL takes priority over Geolocation Current Location. * * When “Current Location” is enabled in WPForms > Settings > Geolocation, * the geolocation JS overwrites address fields that were pre-filled via URL * parameters…Continue reading
/** * Hide Venmo and Pay Later buttons from PayPal Commerce field. * Also hides Apple Pay, Google Pay buttons and Pay Later messages. * * @link https://wpforms.com/developers/wpforms_wp_footer_end/ */ function wpf_hide_paypal_commerce_buttons() { ?>Continue reading
/** * PayPal Commerce customizations for form 877: * – Horizontal layout for payment buttons * – Disable card funding source from SDK * – Hide “Powered by PayPal” element * * @link https://wpforms.com/developers/wpforms_wp_footer_end/ */ // Inject CSS for horizontal…Continue reading
add_filter( ‘woocommerce_product_single_add_to_cart_text’, ‘saphie_custom_add_to_cart_text’ ); add_filter( ‘woocommerce_product_add_to_cart_text’, ‘saphie_custom_add_to_cart_text’ ); function saphie_custom_add_to_cart_text() { return ‘ADD TO BAG’; }Continue reading
function allow_additional_mime_types($mime_types) { $mime_types[‘jpeg’] = ‘image/jpeg’; $mime_types[‘svg’] = ‘image/svg+xml’; $mime_types[‘webp’] = ‘image/webp’; $mime_types[‘avif’] = ‘image/avif’; $mime_types[‘ico’] = ‘image/vnd.microsoft.icon’; return $mime_types; } add_filter(‘upload_mimes’, ‘allow_additional_mime_types’);Continue reading