php artisan cache:clear
composer dump-autoload
sudo chmod -R 775 storage/
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
Category: Web development
-
Change WooCommerce order emails subject
/* * goes in theme functions.php or a custom plugin * * Subject filters: * woocommerce_email_subject_new_order * woocommerce_email_subject_customer_processing_order * woocommerce_email_subject_customer_completed_order * woocommerce_email_subject_customer_invoice * woocommerce_email_subject_customer_note * woocommerce_email_subject_low_stock * woocommerce_email_subject_no_stock * woocommerce_email_subject_backorder * woocommerce_email_subject_customer_new_account * woocommerce_email_subject_customer_invoice_paid **/ add_filter('woocommerce_email_subject_new_order', 'change_admin_email_subject', 1, 2); function change_admin_email_subject( $subject, $order ) { global $woocommerce; $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); $subject = sprintf( '[%s] New Customer Order (# %s) from Name %s %s', $blogname, $order->id, $order->billing_first_name, $order->billing_last_name ); return $subject; }
-
Removing array item and set state in React – functional version
The correct way is by using the array.filter method.
-
Install PHPUnit with WP
Local development
PHPUnit versions vs. WP versions
You may need additional libraries and help. Use Google for that.
-
Adding an admin submenu page to a custom post type CPT
add_submenu_page( 'edit.php?post_type=wnm_funds', 'Fund Settings', /*page title*/ 'Settings', /*menu title*/ 'manage_options', /*roles and capabiliyt needed*/ 'wnm_fund_set', 'CALLBACK_FUNCTION_NAME' /*replace with your own function*/ );