adaptiveimg
Forum Replies Created
-
Okay, I solve it myself. I post here for anyone else it may help:
add_action( 'admin_menu', 'yoursite_admin_orders_url' ); function yoursite_admin_orders_url() { global $submenu; // Get submenu array // Verify the target menu url and append the processing query if ( isset( $submenu["woocommerce"][1][2] ) && "edit.php?post_type=shop_order" == $submenu["woocommerce"][1][2] ) { $submenu["woocommerce"][1][2] .= "&post_status=wc-processing"; } }
Thank you for the information, unfortunately, you misunderstood my question. I’d like the processing list to be shown when the user clicks on the Orders links in the menu. In essence change the default behaviour from showing all orders to to showing processing orders.
I tried looking at how to change how the URL is built for the Woocommerce order list but I can’t figure it out. Any guidance is most welcome. Thank you.Hi,
Thank you for the info, I just believed that as Woocommerce Paypal Standard has provision to specify the URL that Woocommerce Paypal Checkout would also. I have been using Paypal Standard already and the logo is located outside the the WP folder.
I would like to use the same logo file, is there a way to define the URL via the functions.php?
Thank you for your help,
Jon.Hi,
Okay, I pulled the template markup and PPExp session test logic, enabling me to define the following hooked function in functions.php. In this way I avoid modifying the plugin files themselves. It works but it may not be that robust:/** * We display the order notes markup (copied from template form-shipping.php) * Check PPExp context by using same as WC_Gateway_PPEC_Checkout_Handler->has_active_session() */ add_action( 'woocommerce_checkout_shipping', 'mysitename_shipping_order_notes' ); function mysitename_shipping_order_notes() { if ( ! WC()->session ) { return false; } $session = WC()->session->paypal; if ( is_a( $session, 'WC_Gateway_PPEC_Session_Data' ) && $session->payer_id && $session->expiry_time > time() ) { $checkout = WC_Checkout::instance(); ?> <div class="woocommerce-additional-fields"> <?php do_action( 'woocommerce_before_order_notes', $checkout ); ?> <?php if ( apply_filters( 'woocommerce_enable_order_notes_field', 'yes' === get_option( 'woocommerce_enable_order_comments', 'yes' ) ) ) : ?> <?php if ( ! WC()->cart->needs_shipping() || wc_ship_to_billing_address_only() ) : ?> <h3><?php _e( 'Additional information', 'woocommerce' ); ?></h3> <?php endif; ?> <div class="woocommerce-additional-fields__field-wrapper"> <?php foreach ( $checkout->get_checkout_fields( 'order' ) as $key => $field ) : ?> <?php woocommerce_form_field( $key, $field, $checkout->get_value( $key ) ); ?> <?php endforeach; ?> </div> <?php endif; ?> <?php do_action( 'woocommerce_after_order_notes', $checkout ); ?> </div> <?php } return false; }
Thanks,
Jon.Okay, I’ll see if I can replace the hooked function. Thank you for your help.
I believe that order notes should be present by default for customers who need to provide a delivery instruction. Can this be made a feature request for this plugin?
Thank you.
Hi,
Apologies for late reply. I’m a little confused by what you mean by cart page or checkout page. The yellow Paypal Express button is shown in the cart page below the checkout button, there is no yellow Paypal Express button in the checkout page unless this is a configuration option?
Thank you for your help on this.
Regards,
Jon.