function custom_woo_ce_cron_export_ftp_switch() { // ftp_put or ftp_fput return ‘ftp_fput’; } add_filter( ‘woo_ce_cron_export_ftp_switch’, ‘custom_woo_ce_cron_export_ftp_switch’ );Continue reading
function custom_woo_ce_cron_export_email_wp_mail_failure_notice() { // Turn off the error notice return false; } add_filter( ‘woo_ce_cron_export_email_wp_mail_failure_notice’, ‘custom_woo_ce_cron_export_email_wp_mail_failure_notice’ );Continue reading
add_filter( ‘aioseo_schema_output’, ‘add_author_name_when_missing’ ); function add_author_name_when_missing( $schema ) { foreach ( $schema as &$schemaItem ) { if ( isset($schemaItem[‘author’]) ) { unset($schemaItem[‘author’]); } } return $schema; }Continue reading
/** * @link https://library.wpcode.com/snippet/r5plvkeo/ */ add_filter( ‘simpay_payment_details_template_tags’, function( $smart_tags ) { $smart_tags[] = ‘subtotal’; return $smart_tags; } ); add_filter( ‘simpay_payment_confirmation_template_tag_subtotal’, function( $value, $payment_confirmation_data ) { $subscription = current( $payment_confirmation_data[‘subscriptions’] ); if ( $subscription ) { $payment = $subscription->latest_invoice->payment_intent; } else…Continue reading
add_filter( ‘aioseo_schema_output’, function ( $schema ) { foreach ( $schema as &$schemaItem ) { if ( empty( $schemaItem[‘mainEntity’] ) && isset( $schemaItem[‘@type’] ) && ‘ProfilePage’ === $schemaItem[‘@type’] ) { global $wp; $current_url = untrailingslashit( home_url( $wp->request ) ); $schemaItem[‘mainEntity’] =…Continue reading
add_shortcode( ‘qem_3_months’, function () { $out = ”; $display = \Quick_Event_Manager\Plugin\Core\Utilities::get_instance()->get_display_settings(); $m0 = do_shortcode( ‘[qem id=”current”]’ ); // get the next month numeral $next_month = gmdate( ‘n’, strtotime( ‘+1 month’ ) ); $m1 = do_shortcode( ‘[qem id=’ . $next_month .…Continue reading
function start_session() { if (!session_id()) { session_start(); } } add_action(‘init’, ‘start_session’);Continue reading
add_filter( ‘the_content’, function ( $content ) { // This snippet requires the DOMDocument class to be available. if ( ! class_exists( ‘DOMDocument’ ) ) { return $content; } if ( !is_single() || !in_the_loop() || !is_main_query() ) { return $content; }…Continue reading
add_filter(‘do_redirect_guess_404_permalink’,’stop_redirect_guess’); function stop_redirect_guess() { return false; }Continue reading
add_filter(‘gettext_wc-vendors’, ‘wcv_change_vendor_search_placeholder’, 10, 3); function wcv_change_vendor_search_placeholder( $translation, $text, $domain ) { if ($text === ‘Search for a vendor’ ) { $translation = ‘New text search for vendor’; // Change this text here. } return $translation; }Continue reading