warrior7089
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Unable to update WordPress (4.9.4) to 4.9.6Changing owner and the group to the www-data (apache ones) of all the files and folders appearing in the errors during wordpress upgrade solved the issue for me
Adding the below code to functions.php loads the scripts and styles only on the relevant pages.
I use the plugin only for social login.if (!is_admin() && !is_page('login') && !is_page('register') && !is_page('lost-password') && !is_page('reset-password')) { wp_dequeue_script( 'the_champ_fb_sdk' ); wp_deregister_script( 'the_champ_fb_sdk' ); wp_dequeue_script( 'the_champ_combined_script' ); wp_deregister_script( 'the_champ_combined_script' ); wp_dequeue_script( 'thickbox' ); wp_deregister_script( 'thickbox' ); wp_dequeue_style('the_champ_frontend_css'); wp_deregister_style('the_champ_frontend_css'); }
Would be happy if plugin devs can add functionality of sending woocommerce emails if user has checked options.
For example the below code does this, but it’s not perfect and requires merging conflicts after each plugin update:function heateor_ss_new_user_notification($userId){ global $woocommerce; if ((isset($theChampLoginOptions['enable_before_wc']) && $theChampLoginOptions['enable_before_wc'] == 1) || (isset($theChampLoginOptions['enable_after_wc']) && $theChampLoginOptions['enable_after_wc'] == 1)) { $woocommerce->mailer()->emails['WC_Email_Customer_New_Account']->customer_new_account($userId); } // global $theChampLoginOptions; // $notificationType = ''; // if(isset($theChampLoginOptions['password_email'])){ // $notificationType = 'both'; // }elseif(isset($theChampLoginOptions['new_user_admin_email'])){ // $notificationType = 'admin'; // } // if($notificationType){ // wp_new_user_notification($userId, null, $notificationType); // }
Is it possible to remove the hook that sends default user notification and attach another?
I’ve succeeded to attach with the below code in functions.php:add_action('the_champ_before_registration', 'social_login_new_user_notification', 9, 1); /** * Send new user notification email */ function social_login_new_user_notification($userId){ wp_new_user_notification($userId, null, 'user'); }
But failed to remove with the below code in functions.php:
function remove_user_notif_on_social_login() { remove_action('the_champ_before_registration', 'heateor_ss_disable_social_registration', 10, 1); } add_action( 'init', 'remove_user_notif_on_social_login',10);
- This reply was modified 6 years, 7 months ago by warrior7089.
so to disable it, one needs to unregister cart-fragments.js?
Forum: Plugins
In reply to: [WooCommerce] Change order and rename My Account tabsGreat, thanks jurasjo. It works.
I first tried to conceal dashboard with custom-css, but dashboard was still accessible via direct my-account/dashboard.
Your method works.
As a followup question, is it possible to change /my-account/orders url to be /my-account/my-new-url-instead-of-orders, so that url will be consistent with the new name of tab?
Thanks in advance.It helped
Hi, jurasjo.
Thanks a lot. It helpedHi, Kevin.
I would like to import woocommerce products using WooCommerce REST API. So, given csv file with products data, i just POST them via the API according to documentation
As custom tabs are meta data, i thought it’s possible to put in the csv information which will be placed in custom tabs and put it in meta data. Thus, manual adding of tabs and their content won’t be necessary, the same way, manually adding of products is not necessary if bulk import via REST API is used.If it’s possible to import custom tabs, i don’t know what to put in meta data argument for custom tabs.
Hope it’s clear.- This reply was modified 7 years, 7 months ago by warrior7089.
Thanks!
Forum: Plugins
In reply to: [All-In-One Security (AIOS) – Security and Firewall] DB backupThanks a lot for clarifications!
- This reply was modified 7 years, 7 months ago by warrior7089.
Forum: Plugins
In reply to: [All-In-One Security (AIOS) – Security and Firewall] DB backupHi, thanks a lot.
The second issue raises an eyebrow on the possibility that hackers could do the same if password is not required to access the database. )