Category: Admin
Yandex (New Counter)
Supports sending an email with a Stripe Pre-Approved payment is submitted.
add_action( ‘init’, function() { if ( ! class_exists( ‘\EDD\Emails\Types\Email’ ) ) { return; } /** * The PreApproved email class. * * This is sent to customers as their ‘preapproved payment confirmation’. */ class EDDWP_PreApproved_Email extends \EDD\Emails\Types\Email { /** *…Continue reading
Remove Gateway Choice On A Campaign/Donation Page
// add this snippet to functions.php in your theme add_filter( ‘charitable_active_gateways’, ‘charitable_change_gateways_per_campaign’, 10, 1 ); function charitable_change_gateways_per_campaign( $gateways ) { global $post; // $gateways will be an array similar to this: // [offline] => Charitable_Gateway_Offline // [stripe] => Charitable_Gateway_Stripe_AM if…Continue reading
Class Clashes | Display Eventbrite Events
add_filter( ‘wfea_event_classes’, function ( $classes ) { return str_replace( ‘free’, ‘wfea__free’, $classes ); }, 10, 1 );Continue reading
Change Add Product button URL
add_filter( ‘wcv_dashboard_quick_links’, ‘change_add_product_link’ ); /** * Change the add product link * * @param array $links The links. */ function change_add_product_link( $links ) { if ( isset( $links[‘product’] ) ) { $links[‘product’][‘url’] = ‘https://example.com/add-product/’; $links[‘product’][‘label’] = __( ‘Add Product’, ‘wc-vendors’…Continue reading
Copyright Year Shortcode
function year_shortcode () { $year = date_i18n (‘Y’); return $year; } add_shortcode (‘year’, ‘year_shortcode’);Continue reading
Territory Rulebook Chatbot GPT
Territory Rulebook Chatbot GPT
Automatically Delete Woocommerce Images After Deleting a Product
// Automatically Delete Woocommerce Images After Deleting a Product add_action( ‘before_delete_post’, ‘delete_product_images’, 10, 1 ); function delete_product_images( $post_id ) { $product = wc_get_product( $post_id ); if ( !$product ) { return; } $featured_image_id = $product->get_image_id(); $image_galleries_id = $product->get_gallery_image_ids(); if( !empty(…Continue reading