What do you want to save?
Add Code snippet
New code examples
-
PHP 2022-01-22 06:10:21
cron job in wordpress
register_activation_hook(__FILE__, 'my_activation'); function my_activation() { if (! wp_next_scheduled ( 'my_hourly_event' )) { wp_schedule_event(time(), 'hourly', 'my_hourly_event'); &nb... Add solution -
PHP 2021-11-21 07:28:10
woocommerce update cart price
function before_calculate_totals( $cart_obj ) { if ( is_admin() && ! defined( 'DOING_AJAX' ) ) { return; } // Iterate through each cart item foreach( $cart_obj->get_cart() as $key=>$value ) { if( isset( $value['csCost'] ) ) { ... Add solution -
PHP 2021-11-21 02:11:10
wordpress account creation referrer page
function redirect_user_tologin(){ global $post; $post_slug = $post->post_name; if(!is_user_logged_in()){ if($post_slug == 'my-account') { //can add multiple conditions //create dynamic redirect page link $redirect = ur... Add solution -
PHP 2021-11-19 04:37:13
Woocommerce Display Custom Field value on the Email [Custom Field Display 3]
/** * Display field value on the Email.. * source https://rudrastyh.com/woocommerce/order-meta-in-emails.html * PHP Custom Feild Value * @param $order_obj Order Object * @param $sent_to_admin If this email is for administrator or for a customer * @p... Add solution -
PHP 2021-11-18 07:33:17
buddy group hide notice join
function victor_dont_save_join_group_activity( $activity_object ) { $exclude = array( 'joined_group' ); if( in_array( $activity_object->type, $exclude ) ) $activity_object->type = false; } add_action('bp_activity_before_save', ... Add solution -
PHP 2021-11-17 23:33:14
white labeling wordpress divi
<?php/** * Custom WordPress admin color scheme */ function et_load_admin_css() { wp_enqueue_style( 'et-admin-css', get_template_directory_uri() . '/css/admin.css' ); } add_action( 'admin_print_styles', 'et_load_admin_css' );?> Add solution
Best helpers
Ranking is empty