lucytech
Forum Replies Created
-
Forum: Plugins
In reply to: [PW WooCommerce Gift Cards] product idThe settings are fine there – see image.
It simply does not show in the product list…
Forum: Plugins
In reply to: [PW WooCommerce Gift Cards] product idI wrote a review – thanks.
One more question – I’ve created a product and the page exists but when I search for the product from the dashboard it is not listed?
Why is that??
- This reply was modified 2 years ago by lucytech.
Forum: Plugins
In reply to: [PW WooCommerce Gift Cards] product idperfect!!
Thank you so much, that code was a huge help.
Thanks for a great plugin.
Forum: Plugins
In reply to: [PW WooCommerce Gift Cards] product idthat was really helpful for the product page, thank you.
Now I need to adjust the code for the cart page – all prices are half price except for the gift card. This is my current code:
foreach ( $cart->get_cart() as $cart_item_key => $cart_item ) {
$product = $cart_item[‘data’];
$price = $product->get_price();
$cart_item[‘data’]->set_price(round($price/2,2));
}Is there $cart_item[‘data’] I can use that is unique for pw gift card to make an exception for the gift card?
Forum: Plugins
In reply to: [PW WooCommerce Gift Cards] product idadd_filter( 'woocommerce_variable_price_html', 'custom_min_max_variable_price_html', 10, 2 ); function custom_min_max_variable_price_html( $price, $product ) { if ( is_admin() ) return $price; $min_var_reg_price = $product->get_variation_regular_price( 'min', true ); $min_var_sale_price = $product->get_variation_sale_price( 'min', true ); $max_var_reg_price = $product->get_variation_regular_price( 'max', true ); $max_var_sale_price = $product->get_variation_sale_price( 'max', true ); if ( ! ( $min_var_reg_price == $max_var_reg_price && $min_var_sale_price == $max_var_sale_price ) ) { if ( $min_var_sale_price < $min_var_reg_price ) { if ( wc_current_user_has_role( 'whole_sale' ) ) { $price = sprintf( __( 'From: <del>%1$s</del><ins>%2$s</ins>', 'woocommerce' ), wc_price( round($min_var_reg_price/2,2) ), wc_price( round($min_var_sale_price/2,2) ) ); }else{ $price = sprintf( __( 'From: <del>%1$s</del><ins>%2$s</ins>', 'woocommerce' ), wc_price( $min_var_reg_price ), wc_price($min_var_sale_price) );
I have this code for the variable products. I don’t want to show the price as half price for the gift card.
How can I check if the product_id = gift card and then run the correct card?
Forum: Plugins
In reply to: [WooCommerce] how do delete customersI used those queries and tried those plugins but what I’m tryong to explain is that it deletes users from the user table but NOT from the woocommerce customer table. To do that I ran:
SELECT * from wp_wc_customer_lookup where user_id not in (SELECT wp_users.ID FROM hyg_users) LIMIT 400;?
Forum: Plugins
In reply to: [WooCommerce] how do delete customersIt would be very helpful if woocommerce customers list had a delete option so it could be deleted.
The option you gave me in the first thread
does not have a query to delete them from the woocommerce customers, it only has a query to delete them from the wordpress user list.
I found the woocommerce customer table in the end but an updated code example would be very helpful for people.
Thanks
Forum: Plugins
In reply to: [WooCommerce] how do delete customersI had to delete them directly from the database table.
Now it is upto date.
Forum: Plugins
In reply to: [WooCommerce] how do delete customersthanks I ran the database commands and I’m left with about 600 users.
However, if I go to Woocommerce -> Customers it is still showing 13,600. How do I update this list?
Forum: Fixing WordPress
In reply to: delete users who never made an orderthanks.
could you help me complete the code to delete the user?
I’m not sure what to put here:
if( empty($orders) ) { echo “delete user “.$user->ID.”\n”; } // run command to perform the actual deletion.
Forum: Plugins
In reply to: [Yoast SEO] yoast seo not showing on elementorso then I should not include them in the search results right? It doesn’t make sense to include them if I can’t customise the fields?
I’m having issues with the correct SEO description showing with my template pages, it is just showing the default homepage description.
Could this be the cause?
Forum: Plugins
In reply to: [Yoast SEO] yoast seo not showing on elementorso then how would I add Yoast SEO to the template pages if I have elementor templates set to show up in the search results?
Forum: Plugins
In reply to: [WooCommerce] recently viewed cookie not being savedI pasted the code in functions.php and it seems to have fixed the issue.
Thanks so much for your help.
Forum: Plugins
In reply to: [WooCommerce] recently viewed cookie not being savedI have the cookie excluded from the cache. Is that ok or do you have a JavaScript code example that would work better?
When do you think you will update the code? I’m not sure how to implement the change you suggested.
Thanks
Forum: Plugins
In reply to: [WooCommerce] recently viewed cookie not being savedI’m not using a plugin, just code that calls the cookie.
My issue is there is no $_COOKIE[‘woocommerce_recently_viewed’].? cookie being stored. The code itself is irrelevant. You can see in inspect element there is no cookie being created.
My question is – is $_COOKIE[‘woocommerce_recently_viewed’].? a default cookie that should be created? Or is it connected to a plugin and I need to find the source?
If it is default then why isn’t it being stored?