Add PDF to purchase receipt

/** * * @param array $attachments required Any existing attachments * @param int $payment_id optional ID of the current payment * @param array $payment_data optional The remaining payment data * @return array $attachments Now our attachment is added */ function…Continue reading

Disable New User Notifications

/* Remove new user email for admin and user on Registration form */ remove_action( ‘edd_insert_user’, ‘edd_new_user_notification’, 10, 2 ); /* Remove new user email for admin and user on Checkout Registration form */ add_action( ‘edd_pre_process_purchase’, ‘prefix_remove_user_emails’ ); function prefix_remove_user_emails() {…Continue reading

MemberPress: Remove State Text Field

function mepr_remove_state_field() { global $post; $mepr_options = MeprOptions::fetch(); $is_product_page = ( false !== ( $prd = MeprProduct::is_product_page($post) ) ); if( $mepr_options->global_styles || $is_product_page ) { ?>Continue reading

Move Jump to Recipe above featured image in Genesis

/** * Ensures the “Jump to Recipe” button is added above the featured image. */ add_action( ‘init’, function(){ if ( method_exists( ‘Tasty_Recipes\Shortcodes’, ‘filter_the_content_late’ ) ) { remove_filter( ‘the_content’, array( ‘Tasty_Recipes\Shortcodes’, ‘filter_the_content_late’ ), 100 ); add_action( ‘genesis_before_entry_content’, function() { echo Tasty_Recipes\Shortcodes::filter_the_content_late(…Continue reading

Move Jump to Recipe above featured image

/** * Ensures the “Jump to Recipe” button is added to the content really late. */ add_action( ‘init’, function() { if ( method_exists( ‘Tasty_Recipes\Shortcodes’, ‘filter_the_content_late’ ) ) { remove_filter( ‘the_content’, array( ‘Tasty_Recipes\Shortcodes’, ‘filter_the_content_late’ ), 100 ); add_filter( ‘the_content’, array( ‘Tasty_Recipes\Shortcodes’,…Continue reading

Kupon kódok megjelenítése az értesítő email-ekben

add_action( ‘woocommerce_email_order_meta’, function( $order, $sent_to_admin, $plain_text, $email ) { // Check if coupon is used in order if ( $order->get_used_coupons() ) { // Get the coupon codes used in the order $coupon_codes = implode( ‘, ‘, $order->get_used_coupons() ); // Set…Continue reading

WPForms: new smart tag – Current Date/Time

// Register the smart tag. add_filter( ‘wpforms_smart_tags’, static function( $tags ) { // Key is the tag, value is the tag name. $tags[‘current_time’] = ‘Current Date/Time’; return $tags; } ); // Replace its value on form render on front-end. add_filter(…Continue reading