Thomas Shellberg
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] FATAL ERROR AFTER UPGRADING WOOCOMMERCE@joyryde – It sounds like the update failed to finish, resulting in missing files. I would check your server logs *before* the update to see if there was a communication issue with wordpress.org, perhaps the update was interrupted somehow?
Forum: Plugins
In reply to: [WooCommerce] Showing Card type in Admin New Order emailThere is a native WooCommerce function for translating a card brand into text:
wc_get_credit_card_type_labelBut this is used within the context of viewing saved cards as it requires a token to be created.
The
WC_Payment_Token_CCclass has functions for retrieving the card type if a token was used.I’m pretty sure this information isn’t stored as part of an order, though, so it would be impossible to grab unless you grabbed it yourself and stored it from the Checkout page.
Forum: Plugins
In reply to: [WooCommerce] Get value and old value on update productWhat exactly are you trying to do, grab the old value and store it before updating the new value? It sounds like you’re trying to use the ‘Memento’ design pattern:
Maybe something as simple as this:
<script> jQuery(function($) { // if our custom button is clicked $(".single_add_to_cart_button").on("click", function() { $(".your-custom-button").show(); }); }); </script>@517design – it seems like you’ve done most of the work already, you would probably just need a bit of JavaScript that listens for the Add to Cart button’s onClick function and then call
.show()to show the View Cart button. You would use.hide()to initially hide it or just have it hidden by default with CSS.BTW this is done by default on Shop pages, so perhaps you could take a look at how that’s done. 🙂
- This reply was modified 7 years, 11 months ago by Thomas Shellberg.
Forum: Plugins
In reply to: [WooCommerce] New states show up as codes in e-mailsI just tested the snippet in that doc and it works fine for me. I created a custom state called ‘New New York'(NNY) and everything displayed properly, both at checkout and in emails:
I would try testing with a default theme, perhaps your theme has outdated email templates.
Forum: Plugins
In reply to: [WooCommerce] How to send a webhook with a post request?@thunderstruckk – a webhook is designed to fire an external request from your site to another when a certain WooCommerce action is performed, thus, you shouldn’t need to specify the details of how it’s sent.
Perhaps you’re trying to use the REST API instead?
Forum: Plugins
In reply to: [WooCommerce] FATAL ERROR AFTER UPGRADING WOOCOMMERCEIt sounds like you might have updated Stripe before updating a very old version of WooCommerce?
Are you using the latest version of WooCommerce(3.4.2)? If not, download the newest version, unpack it, and upload the folder to your /wp-content/plugins folder, overwriting the previous version.
Forum: Plugins
In reply to: [WooCommerce] Show Purchase Note in Admin emailHi there, I just provided what looks like a solution here:
https://wordpress.org/support/topic/purchase-note-in-customer-and-admin-e-mail/
Forum: Plugins
In reply to: [WooCommerce] External Links not showing in product pageYou would need to override the Add to Cart button specifically for external products:
/woocommerce/templates/single-product/add-to-cart/external.phpIf you’d like to see this changed, please contribute to this open issue here, it will help determine if it should be updated:
Forum: Themes and Templates
In reply to: [Storefront] No shop on site@clonesoft – That’s a really strange issue. Does the ‘Shop’ page become unpublished(marked as ‘Draft’)? If it remains published, when you visit the page, are there errors or is the page just blank?
@denniro – I tested this on my local setup and the ‘Support Recurring Pay’ checkbox was immediately visible when I enabled Tokenization. Maybe check to make sure that page isn’t cached?
I would enable Sandbox mode and test that it actually works with Subscriptions before going live, it’s a good idea to know that it works before having customers sign up.
@gerdneumann – no worries, however, this also worked for me:
Forum: Plugins
In reply to: [WooCommerce] Purchase Note in customer and admin e-mail@hahlrichs – Try this?
https://gist.github.com/tommyshellberg/bec88c936f387dfd3396ae92dde3e1dc
Add it using a plugin like Code Snippets or Functionality.
Forum: Plugins
In reply to: [WooCommerce] Purchase Note in customer and admin e-mailThere’s a filter that appears to be suited for this:
woocommerce_email_order_items_argsYou could write a function that brings in $args and sets the
$args['sent_to_admin']key to be true.From the code:
'show_purchase_note' => $order->is_paid() && ! $args['sent_to_admin']