Some users reported the recipe not redirecting to the referer after checkout.
Updated the my_pmpro_redirect_to_referring_page_after_checkout_track
function that sets the cookie here: ipokkel/32d6ba9425d4550a5861709498e00135
Some users reported the recipe not redirecting to the referer after checkout.
Updated the my_pmpro_redirect_to_referring_page_after_checkout_track
function that sets the cookie here: ipokkel/32d6ba9425d4550a5861709498e00135
<?php | |
/** | |
* Hide the 'my_pods_item' post type from searches and archives if membership is required to access. | |
* Update the $post_types[] array with one or more pod names you need to protect. | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ |
<?php | |
add_filter( 'tribe_tickets_shortcode_can_see_content', static function( $can_see_content, $filter_args ) { | |
// Only run our logic below if the user is logged in or if they cannot currently see the content. | |
if ( ! is_user_logged_in() || $can_see_content ) { | |
return $can_see_content; | |
} |
<?php | |
add_action( 'woocommerce_order_status_changed', 'rt_ct_reset_failed_payouts', 9, 4 ); | |
function rt_ct_reset_failed_payouts( $order_id, $status_from, $status_to, $order ) { | |
if ( 'completed' === $status_to ) { | |
$payouts = tribe_payouts(); | |
// Get payouts by Order ID. | |
$payouts->by( 'order', $order_id ); |
<?php | |
// Register the action for the Edit order screen. | |
add_filter( 'woocommerce_order_actions', 'tec_event_tickets_plus_wc_register_force_regenerate_attendees' ); | |
// Register the bulk action for the Orders screen. | |
add_filter( 'bulk_actions-edit-shop_order', 'tec_event_tickets_plus_wc_register_force_regenerate_attendees' ); | |
/** | |
* Register the custom action to the list of order actions. |
<?php | |
//pods: https://imgur.com/a/MflzgtI | |
$search = sanitize_text_field( $search ); | |
$query = array(); | |
$query[] = 'brand.meta_value = ' . absint( $_REQUEST['brand_id'] ); | |
$query[] = ' | |
d.asset_name LIKE "%' . pods_sanitize_like( $search ) . '%" | |
OR product_d.sku like "%' . pods_sanitize_like( $search ) . '%" |
<?php | |
/** | |
* Plugin Name: Pods_Persist_And_Deploy | |
* Description: Allows locking down Pods on deployment allowing version control of Pods post types, taxonomies and fields. | |
*/ | |
// | |
//add_action( 'plugins_loaded', array( 'Pods_Deploy', 'on_load' ), 5 ); | |
/* |
<?php | |
/* | |
* This code goes into theme functions.php or a custom plugin | |
*/ | |
/** | |
* Add product to cart on page load | |
*/ | |
function add_product_to_cart() { |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
<?php | |
function slug_tax_update_PRE( $pieces, $is_new_item, $id ) { | |
if ( 0 < $id ) { | |
$term = (int) $pieces[ 'fields' ][ 'tax' ][ 'value' ]; | |
wp_set_object_terms( $id, $term, 'ant', false ); | |
} | |
return $pieces; |