pkollias
Forum Replies Created
-
Forum: Plugins
In reply to: [ReOrder Posts within Categories] Orderby in Rest APII think I understand what is going on. Firstly, I have to remove the “orderby” from my call to the API. Also, it seems that either the REST API or the browser caches the old sorting, so if i clear the cache, the order is showing as expected in the front-end.
Forum: Plugins
In reply to: [ReOrder Posts within Categories] Orderby in Rest APIAfter the update, the post order is from a previous version! But as i told you, i am using the REST API to display my posts. Do you use a custom orderby , so i can pass it to the api call?
Forum: Plugins
In reply to: [ReOrder Posts within Categories] Orderby in Rest APIHello. OK I see. After the last update, the order changed by itself. Is there a way to recover it? Or does it have to be done again? I see that the order is not saved, even after re-ordering
- This reply was modified 11 months, 1 week ago by pkollias.
Thank you, i did!
Thank you so much!
@mouindi , thank you. For everyone that might want to add extra field (e.g. phone), I provide the code (put in functions.php):
function add_alert_phone_field( $array ) {
$array[‘stock_alert_phone’] = array(
‘type’ => ‘text’,
‘class’ => ‘stock_alert_phone’,
‘placeholder’ => __(‘Enter your mobile phone number’, ‘woocommerce-product-stock-alert’)
);
return $array;}
add_filter(‘woo_stock_alert_fileds_array’, ‘add_alert_phone_field’);function push_additional_fields( $text ) {
return [‘stock_alert_phone’];
}
add_filter(‘woocommerce_product_stock_alert_form_additional_fields’, ‘push_additional_fields’);function woocommerce_email_footer_phone_field(){
$stock_alert_phone = ”;
if ( ! empty($_POST[‘stock_alert_phone’])){
$stock_alert_phone = $_POST[‘stock_alert_phone’]; ?>
<?php
}
add_action( ‘woocommerce_email_footer’, ‘woocommerce_email_footer_phone_field’ );- This reply was modified 1 year ago by pkollias.
A solution could be to replace the selector with
$('.'+woo_stock_alert_script_data.additional_fields[i]).val();
or something similar? Could you please fix it in the next version? Thank you.
Thank you for your reply. It is not urgent, if it will be available in the next version, i can wait. The code is in my first post.
Another issue is that the admin email is not removed even if i check it. it keeps receiving emails
Hello,
I managed to programmatically change the rule cost using the woocommerce_shipping_rate_cost filter as follows:
function my_shipping_cost_tiers( $cost, $method ) { if ( in_array( $method->get_instance_id(), array( 10 ) ) && WC()->cart ) { return $cost + ($cost * 0.24); } return $cost; } add_filter( 'woocommerce_shipping_rate_cost', 'my_shipping_cost_tiers', 10, 2 );
where in the array I put the instance id/ids i want to target.
Thank you!
Hello all,
we face the same problem. Have you managed to see what is causing it? Does it have to do maybe with “Order status” settings?
Thank you
Hello @wcmp , thank you for your guidance.
I am able to display the field, and move it with jquery, but i can’t display it to the emails. Here’s what i did so far:add_action( 'woocommerce_product_stock_alert_form_after', 'woocommerce_product_stock_alert_form_phone_field' ); function woocommerce_product_stock_alert_form_phone_field(){ ?> <input id="alert_phone_input" type="text" pattern="[0-9]+" class="stock_alert_phone" name="alert_phone" placeholder="<?php _e('Enter your mobile phone number', 'woocommerce-product-stock-alert'); ?>"/> <script type="text/javascript"> jQuery( function($){ $("#alert_phone_input").insertAfter('.stock_alert_email'); }); </script> <?php } add_action( 'woocommerce_email_footer', 'woocommerce_email_footer_phone_field' ); function woocommerce_email_footer_phone_field(){ $alert_phone = ''; if ( ! empty($_POST['alert_phone'])){ $alert_phone = $_POST['alert_phone']; } ?> <p> <strong><?php esc_html_e( 'Mobile phone number', 'woocommerce-product-stock-alert' ); ?> : </strong> <span><?php echo $alert_phone; ?></span> </p> <?php }
Forum: Reviews
In reply to: [Advanced Shipment Tracking for WooCommerce] Works excellent +++Thank you, it works perfect now, review changed and everything ‘s good. Sorry for the inconvenience.
Hello @wcmp , i am developer and would like to add extra field to the form for my website. How can you guide me please? Can we use hooks/filters? Or maybe change functions? Thank you
Forum: Reviews
In reply to: [Advanced Shipment Tracking for WooCommerce] Works excellent +++Thank you. It is working good now and the order statuses are back. But Is it mandatory to create a Trackship account in order for this to work? We do not wish to have custom order statuses or automatically renamed. Thank you.
Same problem here, i found it at github
https://github.com/woocommerce/WooCommerce-Quantity-Increment