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

Event Data | Display Eventbrite Events

add_filter( ‘wfea_api_results’, // hook to filter returned event data before display /** * @param $events * @param $atts * * @return mixed * @throws Exception */ function ( $events, $atts ) { if ( ! in_array( $atts[‘layout’], array( ‘cal_list’, ‘cal’…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

Cusdtom WP escape

function my_plugin_kses( $html ) { $kses_defaults = wp_kses_allowed_html( ‘post’ ); $svg_args = array( ‘svg’ => array( ‘class’ => true, ‘aria-hidden’ => true, ‘aria-labelledby’ => true, ‘role’ => true, ‘xmlns’ => true, ‘fill’ => true, ‘width’ => true, ‘height’ => true,…Continue reading