ralbatross
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Order details are blank in WooCommerce -> Order pageAha! I re-installed WordPress and that fixed it. I must have been hacking at core files while troubleshooting something.
Forum: Plugins
In reply to: [WooCommerce] Order details are blank in WooCommerce -> Order pageThanks for the feedback Hannah,
As I mentioned in my original post the problem persists even when I have all plugins except WooCommerce disabled, and I am using the Storefront theme. I have just re-confirmed this fact. It surprises me too, but it is true: I have only WooCommerce and Storefront running, and the orders are still not appearing.
Something like this inside of a function seems to do the trick:
global $as3cf; if ( $as3cf ) { // Make sure WP Offload S3 is there $url = $as3cf->get_s3client($as3cf->get_setting('region')) ->get_object_url( $as3cf->get_setting('bucket'), <object key>, time()+900 ); }This grabs a pre-signed url for <object key>, independent of any attachment ids in WordPress
- This reply was modified 7 years, 8 months ago by ralbatross.
- This reply was modified 7 years, 8 months ago by ralbatross.
Forum: Plugins
In reply to: [WooCommerce] Open external product link in new tab?If you’re already tampering with the links, you will likely need to check whether the current link is for an external product or not using something like the code below (copied from this thread). If it’s an external product, then you’ll want to add a
target="_blank"to the<a>tag in order to have it open in a new tab.global $post; if( function_exists('get_product') ){ $product = get_product( $post->ID ); if( $product->is_type( 'external' ) ){ // do something with external products } }The Dynamic Pricing plugin allows you to do that.
Forum: Plugins
In reply to: [WooCommerce] WooCommerce shipping methods filterLooks like you might need to use
woocommerce_shipping_methodsinstead ofwoocommerce_available_shipping_methods?https://docs.woothemes.com/wc-apidocs/source-class-WC_Shipping.html#112
Forum: Plugins
In reply to: Can't upgrade plugins or themes after upgrade to 4.4The link in my previous message goes to the bug report, but I’ll link it again here π
Forum: Plugins
In reply to: Can't upgrade plugins or themes after upgrade to 4.4Looks like this has been reported as a bug.
Forum: Plugins
In reply to: Can't upgrade plugins or themes after upgrade to 4.4After more research I have found the following:
In wp-admin/includes/class-wp-uploader.php, lines 531-535:
//Create destination if needed if ( ! $wp_filesystem->exists( $remote_destination ) ) { if ( ! $wp_filesystem->mkdir( $remote_destination, FS_CHMOD_DIR ) ) { return new WP_Error( 'mkdir_failed_destination', $this->strings['mkdir_failed'], $remote_destination ); } }The
existscall is returning false when I try to update a plugin. This is wrong. I am able to see the directory referred to by$remote_destinationin my OS shell, and it obviously does exist because the failure occurs on the mkdir callβit is unable to make the directory because it already exists.Digging deeper, in wp-admin/includes/class-wp-filesystem-ftpext.php, lines 329-338:
public function exists( $file ) { $path = dirname( $file ); $filename = basename( $file ); $file_list = @ftp_nlist( $this->link, '-a ' . $path ); if ( $file_list ) { $file_list = array_map( 'basename', $file_list ); } return $file_list && in_array( $filename, $file_list ); }If I add the following line just before the return statement…
error_log(debug_backtrace()[1]['function'] . ": \npath: $path\nfilename: $filename\nfile list:\n" . print_r($file_list, true) . "\n");… I see this output…
[11-Dec-2015 18:42:19 UTC] install_package: path: <the expected path> filename: <the expected filename> file list: Array ( )The file list is empty! It should not be. What’s going on here?
Forum: Plugins
In reply to: [WooCommerce] Moving the Proceed to Checkout buttonYou will probably need to do a template override of the cart template in your theme. You should create a child theme in order to do this so that your template change is upgrade-safe.
Forum: Plugins
In reply to: [WooCommerce] Product dimension (weight) column in adminUse the
manage_product_posts_columnsandmanage_product_posts_custom_columnhooks.Something like this should do the trick:
add_filter('manage_product_posts_columns', 'my_manage_product_posts_columns', 10); add_action('manage_product_posts_custom_column', 'my_manage_product_posts_custom_column', 10, 2); function my_manage_product_posts_columns($defaults) { $defaults['weight'] = 'Weight'; return $defaults; } function my_manage_product_posts_custom_column($column_name, $post_ID) { if ($column_name == 'weight') { $p = new WC_Product($post_ID); echo $p->get_weight(); } }Forum: Plugins
In reply to: [WooCommerce] Vendor portalOne suggestion:
- Create a ‘Vendor’ role that is allowed to create products but not publish them.
- Create Vendor users that have this role for each third party vendor you need.
- Vendors will be able to log in to the WordPress admin area and add use it to create products (but nothing else if you have set their capabilities appropriately)
- Use your WooCommerce admin account to approve and publish any products that Vendors have created.
Forum: Plugins
In reply to: [WooCommerce] How to send email to admin on new customer registration ?There is a ‘woocommerce_created_customer’ hook that you can attach to in order to perform actions after a new customer has been created. There is also a wp_new_user_notification function that sends the new user notification email.
So something like this in your functions.php file should do the trick.
add_action('woocommerce_created_customer', 'admin_email_on_registration'); function admin_email_on_registration() { $user_id = get_current_user_id(); wp_new_user_notification( $user_id ); }These threads may also be useful:
https://wordpress.org/support/topic/woocommerce-new-registration-not-sending-email-to-admin?replies=3#post-4374790
http://stackoverflow.com/questions/14343928/woocommerce-new-customer-admin-notification-emailForum: Plugins
In reply to: [WooCommerce] Checkout Addons Conditions Snippet Code?Forum: Plugins
In reply to: [WooCommerce] Product showing up staggeredYou might also try using display: inline-block instead of float: left on the product blocks, something like this:
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product { float: none; display: inline-block; vertical-align: top; }You will likely need to fiddle with the width and margin a bit as well on this style:
.et_pb_gutters3.et_left_sidebar.woocommerce-page ul.products li.product { width: 28%; margin-right: 4.9%; }seems to do the trick for me.