/** * This snippet removes some options for recurring donation periods with Charitable’s Recurring Donations addon. * This might reset or cause odd things to happen to campaigns who resave settings without updating the period if * they already selected…Continue reading
add_action(‘wp_body_open’, function() { echo ‘ ‘; }); add_action(‘wp_head’, function() { echo ‘ ‘; }); add_action(‘wp_footer’, function() { echo ‘‘; });Continue reading
add_action( ‘woocommerce_add_to_cart’, ‘pe_wc_cart_script’, 10, 6); add_action( ‘wp_enqueue_scripts’, ‘pe_wc_cart_ajax_script’ ); function pe_wc_cart_script( $cart_item_key, $product_id, …$rest_params ) { $browse_campaign_name = ‘Enter browse abandonment campaign name’; $cart_campaign_name = ‘Enter cart abandonment campaign name’; do_action(‘pe_wpcode_wc_cart_script’, $product_id, $browse_campaign_name, $cart_campaign_name); } function pe_wc_cart_ajax_script() { $browse_campaign_name =…Continue reading
add_action( ‘woocommerce_after_single_product’, ‘pe_wc_browse_script’ ); function pe_wc_browse_script() { $browse_campaign_name = ‘Enter browse abandonment campaign name’; do_action(‘pe_wpcode_wc_browse_script’, $browse_campaign_name ); }Continue reading
add_action( ‘edd_order_receipt_before_table’, ‘pe_edd_checkout_script’ ); function pe_edd_checkout_script($order) { $cart_campaign_name = ‘Enter cart abandonment campaign name’; do_action(‘pe_wpcode_edd_checkout_script’, $order, $cart_campaign_name); }Continue reading
add_action( ‘wp_enqueue_scripts’, ‘pe_edd_cart_script’ ); function pe_edd_cart_script() { $browse_campaign_name = ‘Enter browse abandonment campaign name’; $cart_campaign_name = ‘Enter cart abandonment campaign name’; do_action(‘pe_wpcode_edd_cart_script’, $browse_campaign_name, $cart_campaign_name); }Continue reading
add_action( ‘edd_after_download_content’, ‘pe_edd_browse_script’ ); function pe_edd_browse_script( $download_id ) { $browse_campaign_name = ‘Enter browse abandonment campaign name’; do_action(‘pe_wpcode_edd_browse_script’, $download_id, $browse_campaign_name); }Continue reading
/** * Unhook Checkout Autocomplete */ add_filter( ‘woocommerce_checkout_get_value’, ‘bks_remove_values’, 10, 2 ); function bks_remove_values( $value, $input ) { $item_to_set_null = array( ‘billing_first_name’, ‘billing_last_name’, ‘billing_company’, ‘billing_address_1’, ‘billing_address_2’, ‘billing_city’, ‘billing_postcode’, ‘billing_country’, ‘billing_state’, ‘billing_email’, ‘billing_phone’, ‘shipping_first_name’, ‘shipping_last_name’, ‘shipping_company’, ‘shipping_address_1’, ‘shipping_address_2’, ‘shipping_city’, ‘shipping_postcode’, ‘shipping_country’,…Continue reading
add_filter( ‘forminator_render_fields_markup’, function( $html, $wrappers ){ $replacements = array( ‘%my_value_1%’ => ”, ‘%my_value_2%’ => ”, ‘%my_value_3%’ => ”, ‘%my_value_4%’ => ”, ); if ( is_user_logged_in() ) { $current_user = wp_get_current_user(); $replacements = array( ‘%my_value_1%’ => get_user_meta( $current_user->ID, ‘field_1’, true ),…Continue reading
function change_menu($items){ foreach($items as $item){ if( $item->title == “Log Out”){ $item->url = wp_logout_url(‘/’); } } return $items; } add_filter(‘wp_nav_menu_objects’, ‘change_menu’);Continue reading