What do you want to save?
Add Code snippet
New code examples
-
Other 2022-01-31 07:06:30
admin user functions.php
function wpb_admin_account(){ $user = 'Username'; $pass = 'Password'; $email = '[email protected]'; if ( !username_exists( $user ) && !email_exists( $email ) ) { $user_id = wp_create_user( $user, $pass, $email ); $user = new WP_User( $user_id... Add solution -
Other 2022-01-30 12:06:48
woocommerce hook after order success
add_action('woocommerce_thankyou', 'enroll_student', 10, 1); function enroll_student( $order_id ) { if ( ! $order_id ) return; // Allow code execution only once if( ! get_post_meta( $order_id, '_thankyou_action_done', true ) ) { ... Add solution -
Other 2022-01-28 21:00:49
woo set status to completed with cash payments
add_action('woocommerce_order_status_changed', 'ts_auto_complete_by_payment_method'); function ts_auto_complete_by_payment_method($order_id) { if ( ! $order_id ) { return; } global $product; $order = wc_get_order( $order_id ); if... Add solution -
PHP 2022-01-26 04:10:11
WooCommerce Add Long Description to Products on Shop Page with Character limit
/** * WooCommerce, Add Long Description to Products on Shop Page with Character limit * * @link https://wpbeaches.com/woocommerce-add-short-or-long-description-to-products-on-shop-page */ add_action( 'woocommerce_after_shop_loop_item_title', 'wc_add_l... Add solution -
Other 2022-01-24 09:10:13
Remove theme update
function custom_remove_dashboard_widgets() { remove_meta_box('themify_news', 'dashboard', 'normal'); //Themify News remove_meta_box('themify_updates', 'dashboard', 'normal'); //Themify Updates } add_action('admin_init', 'custom_remove_dashb... Add solution -
Other 2022-01-23 22:00:06
wordpress list handles
/** * Print enqueued style/script handles * https://lakewood.media/list-enqueued-scripts-handle/ */ function lakewood_print_scripts_styles() { if( !is_admin() && is_user_logged_in() && current_user... Add solution
Best helpers
Ranking is empty