Dat Hoang
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] How to add Upsells/Cross-sells to a product via PHP?Hi,
I am not able to write a fully workable work but I have some general directions:
1. First of all, you need to convert SKUs into product IDs: https://docs.woocommerce.com/wc-apidocs/function-wc_get_product_id_by_sku.html
2. After that, you can use the following code to save upsell and cross_sell products:
$product = wc_get_product( $productId ); if ( $product ) { $product->set_upsell_ids( array (1, 2, 3) ); $product->set_cross_sell_ids( array (4, 5, 6) ); $product->save(); }Reference:
* https://docs.woocommerce.com/wc-apidocs/class-WC_Product.html
* https://docs.woocommerce.com/wc-apidocs/function-wc_get_product.htmlForum: Plugins
In reply to: [WooCommerce] WooCommerce Checkout Page ISSUESHi @valorrsps,
It looks like you’re using PayPal Checkout – https://woocommerce.com/products/woocommerce-gateway-paypal-checkout/
This support forum is to support either PayPal Standard (included in WooCommerce core by default) or general issues with WooCommerce.
I suggest following these steps:
1. Follow this guide to enable and get the log https://docs.woocommerce.com/document/paypal-express-checkout/#section-15
2. Contact us at WooCommerce.com > My Account > Tickets. You may need to create an account. We will be able to help you further there.
—–
Hi @b101,
If you’re using one of PayPal extensions from us https://docs.woocommerce.com/document/paypal-extension-comparison/, feel free to follow the similar steps above.
Forum: Plugins
In reply to: [WooCommerce] is it just me or a bug?Hi @auludag,
You can find related info in the following links:
* https://github.com/woocommerce/woocommerce/issues/21813
* https://github.com/woocommerce/woocommerce/pull/21844Forum: Plugins
In reply to: [WooCommerce] Repeat PayPal Express Button on Product pageHi,
It seems that you’re trying to duplicate “Add to Cart” button from this line https://github.com/woocommerce/woocommerce/blob/0f731d9c3f9a7e75ac5d8ebd9e6ea646165494c1/includes/wc-template-hooks.php#L175:
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );1, If so, you would do something like this for your code:
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_template_single_add_to_cart', 14 );2, Otherwise, if you still want to use your code, you should call the
woocommerce_template_single_add_to_cartfunction directly:function repeat_paypal(){ echo 'Purchase now:'; woocommerce_template_single_add_to_cart(); } add_action( 'woocommerce_after_single_product_summary', 'repeat_paypal', 14);Your code did not work because there is no
add_actionforwoocommerce_template_single_add_to_cart.- This reply was modified 7 years ago by Dat Hoang.
Forum: Plugins
In reply to: [WooCommerce] Price AND ‘Add to cart’ align don’t work on OceanWPHello,
OceanWP may modify and use their own CSS classes.
I would recommend contacting OceanWP to get support regarding this.
Forum: Plugins
In reply to: [WooCommerce] Product Category not showing full hierarchyHi,
Thanks for your extra explaination.
https://babytosenior.ultek.com/babytoseniorwp2/product-category/baby-kids/
The Baby Kids parent category is displaying sub-categories that have their own products.
It does not display other sub-categories because these sub-categories have no product on their own. Instead, they have only futher sub-categories (level 2) like this one:
* Level 1 sub-category https://babytosenior.ultek.com/babytoseniorwp2/product-category/baby-kids/baby-gear/ has no product on their own.
* But it does have a few level 2 sub-categories, e.g: https://babytosenior.ultek.com/babytoseniorwp2/product-category/baby-kids/baby-gear/baby-carrier/, which has some productsTo overcome this, you may want to add this snippet by using https://wordpress.org/plugins/code-snippets/:
add_filter( 'woocommerce_product_subcategories_hide_empty', 'hide_empty_categories', 10, 1 ); function hide_empty_categories ( $hide_empty ) { $hide_empty = FALSE; // You can add other logic here too return $hide_empty; }Forum: Plugins
In reply to: [WooCommerce] Product Category not showing full hierarchyHi,
If you scroll down the
Baby & Kidscategory page, you can see its sub-categories:
Link to image: https://cld.wthms.co/ZdELKDDoes that what you’re looking for?
In this site, you have so many
Accessoriescategories so you need to scroll down a bit.Hi @underhillz,
If so, please forward that confirmation email and mention this topic URL in the email to
support@woocommerce.com.Forum: Plugins
In reply to: [WooCommerce] Trouble viewing WooCommerce order emails on mobileHi,
I am also using an iPhone and I could not replicate this problem.
Can you ask for the app name and a screenshot?
Forum: Plugins
In reply to: [WooCommerce] Woocommerce Country Dropdown List DisappearedHi,
1. Have you made any change recently like installing a new plugin/theme, or changing a setting?
2. Can you please check WooCommerce -> Settings -> General, and see if you limit selling to only one country?
Link to image: https://cld.wthms.co/8g0B273. This may be also caused by either a conflict with your theme or with another plugin.
The best way to determine this is to:
- Temporarily switch your theme to Storefront
- Disable all plugins except for WooCommerce
- Repeat the action that is causing the problem
If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.
Forum: Plugins
In reply to: [WooCommerce] How to show currency code AND symbol?I think what you need is this snippet:
* https://docs.woocommerce.com/document/change-a-currency-symbol/
The one you mentioned above is for adding a new currency rather than an existing currency (AUD) in your case.
Hello,
Can you please let us know the ticket ID when you contacted us from https://woocommerce.com/my-account/create-a-ticket/?
If you’re using https://woocommerce.com/products/woocommerce-distance-rate-shipping/ , we will be sure to support you.
What is the link to
the advanced packaging plugin? If it is https://woocommerce.com/products/woocommerce-advanced-shipping-packages/, we can double check with our development partners if you give us the ticket ID also.Forum: Plugins
In reply to: [WooCommerce] Special formula shipping costsHi,
I do not think this is possible within WooCommerce core.
In the default Flat Rate shipping method, it’s possible to multiply shipping cost based on the number of items with
[qty].* https://docs.woocommerce.com/document/flat-rate-shipping/#section-2
Other than that, like what you want, you can consider using Table Rate Shipping with your defined conditions:
* https://docs.woocommerce.com/document/table-rate-shipping/#section-7
Forum: Plugins
In reply to: [WooCommerce] PayPal is reporting “Amounts do not match” PP StandardHello,
Thank you for contacting WooCommerce support.
I’ve tried to test an order with a coupon and it’s working well.
This kind of problem is usually caused by either a conflict with your theme or with another plugin.
The best way to determine this is to:
- Create a staging site with this plugin https://wordpress.org/plugins/wp-staging/ and switching your PayPal setting to sandbox.
- Temporarily switch your theme to Storefront
- Disable all plugins except for WooCommerce
- Repeat the action that is causing the problem
If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.
Forum: Plugins
In reply to: [WooCommerce] measurement price pluginHi,
Are you using this extension https://woocommerce.com/products/measurement-price-calculator/?
Could you please contact us at WooCommerce.com > My Account > Tickets? You may need to create an account. We will be able to help you further there.
We do not support premium extensions on this community forum.