Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter mauricionieto1994

    (@mauricionieto1994)

    @mkarimzada thank you for your input. To give more context, I am working with the product category taxonomy of Woocommerce, so I am already using the old editor (not gutenberg) so this should not be an issue.

    I ended up going this route, because I found the quick_edit_show_taxonomy filter which allows me to hide the product category taxonomy from the post-list bulk edit and quick edit. This was much cleaner because with both get_terms_args and get_terms I felt I didn’t have exact control of which query I was filtering (Through error_logging and debugging, my filter would fire abount fifteen times! ) So by simply editing the metabox callback and hiding the quick edit box, I fixed what I wanted to do.

    Thank you!

    Thread Starter mauricionieto1994

    (@mauricionieto1994)

    Hello @maykato

    I am developing these changes, so I am adding these fees on my own code. I want fees to be substracted like the product subtotal with coupons.

    Thank you.

    Here goes the system report:

    
    ### WordPress Environment ###
    
    WordPress address (URL): https://shoppy.test
    Site address (URL): https://shoppy.test
    WC Version: 4.2.1
    REST API Version: ? 1.0.8
    WC Blocks Version: ? 2.5.16
    Action Scheduler Version: ? 3.1.6
    WC Admin Version: ? 1.2.4
    Log Directory Writable: ?
    WP Version: 5.5.3
    WP Multisite: –
    WP Memory Limit: 512 MB
    WP Debug Mode: ?
    WP Cron: –
    Language: es_MX
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: nginx/1.15.8
    PHP Version: 7.4.18
    PHP Post Max Size: 100 MB
    PHP Time Limit: 90
    PHP Max Input Vars: 1000
    cURL Version: 7.58.0
    OpenSSL/1.1.1j
    
    SUHOSIN Installed: –
    MySQL Version: 5.7.33-0ubuntu0.18.04.1
    Max Upload Size: 100 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ? wp_remote_post() failed. Contact your hosting provider.
    Remote Get: ? wp_remote_get() failed. Contact your hosting provider.
    
    ### Database ###
    
    WC Database Version: 4.5.0
    WC Database Prefix: sh_
    Total Database Size: 48.68MB
    Database Data Size: 35.57MB
    Database Index Size: 13.11MB
    sh_woocommerce_sessions: Data: 0.02MB + Index: 0.00MB + Engine MyISAM
    sh_woocommerce_api_keys: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    sh_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    sh_woocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    sh_woocommerce_order_items: Data: 0.07MB + Index: 0.04MB + Engine MyISAM
    sh_woocommerce_order_itemmeta: Data: 0.47MB + Index: 0.37MB + Engine MyISAM
    sh_woocommerce_tax_rates: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    sh_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    sh_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    sh_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    sh_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    sh_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    sh_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    sh_woocommerce_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    cache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_actionscheduler_actions: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
    sh_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_actionscheduler_logs: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    sh_brizy_logs: Data: 0.06MB + Index: 0.01MB + Engine MyISAM
    sh_commentmeta: Data: 0.01MB + Index: 0.02MB + Engine MyISAM
    sh_comments: Data: 0.27MB + Index: 0.12MB + Engine MyISAM
    sh_dokan_announcement: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_dokan_orders: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    sh_dokan_refund: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_dokan_shipping_zone_locations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_dokan_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_dokan_vendor_balance: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_dokan_withdraw: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_failed_login_users: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_itsec_distributed_storage: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_itsec_fingerprints: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    sh_itsec_geolocation_cache: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    sh_itsec_lockouts: Data: 0.02MB + Index: 0.08MB + Engine InnoDB
    sh_itsec_logs: Data: 0.20MB + Index: 0.11MB + Engine InnoDB
    sh_itsec_mutexes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_itsec_opaque_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_itsec_temp: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    sh_itsec_user_groups: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    sh_litespeed_img_optm: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    sh_litespeed_optimizer: Data: 0.03MB + Index: 0.01MB + Engine MyISAM
    sh_loginizer_logs: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    sh_mailpoet_custom_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_mailpoet_dynamic_segment_filters: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_mailpoet_feature_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_mailpoet_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_mailpoet_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_mailpoet_mapping_to_external_entities: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_mailpoet_newsletters: Data: 0.19MB + Index: 0.03MB + Engine InnoDB
    sh_mailpoet_newsletter_links: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    sh_mailpoet_newsletter_option: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_mailpoet_newsletter_option_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_mailpoet_newsletter_posts: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_mailpoet_newsletter_segment: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_mailpoet_newsletter_templates: Data: 2.52MB + Index: 0.00MB + Engine InnoDB
    sh_mailpoet_scheduled_tasks: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    sh_mailpoet_scheduled_task_subscribers: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_mailpoet_segments: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_mailpoet_sending_queues: Data: 0.17MB + Index: 0.03MB + Engine InnoDB
    sh_mailpoet_settings: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_mailpoet_statistics_clicks: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    sh_mailpoet_statistics_forms: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_mailpoet_statistics_newsletters: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    sh_mailpoet_statistics_opens: Data: 0.02MB + Index: 0.08MB + Engine InnoDB
    sh_mailpoet_statistics_unsubscribes: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    sh_mailpoet_statistics_woocommerce_purchases: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    sh_mailpoet_stats_notifications: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    sh_mailpoet_subscribers: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
    sh_mailpoet_subscriber_custom_field: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_mailpoet_subscriber_ips: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_mailpoet_subscriber_segment: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    sh_mailpoet_user_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_newsletter: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    sh_newsletter_emails: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_newsletter_sent: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    sh_newsletter_stats: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    sh_newsletter_user_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_odb_logs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    sh_options: Data: 3.01MB + Index: 0.09MB + Engine MyISAM
    sh_postmeta: Data: 7.67MB + Index: 2.92MB + Engine MyISAM
    sh_posts: Data: 6.09MB + Index: 0.65MB + Engine MyISAM
    sh_revslider_css: Data: 0.09MB + Index: 0.00MB + Engine MyISAM
    sh_revslider_css_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_revslider_layer_animations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    sh_revslider_layer_animations_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_revslider_navigations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    sh_revslider_navigations_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_revslider_sliders: Data: 0.05MB + Index: 0.00MB + Engine MyISAM
    sh_revslider_sliders_bkp: Data: 0.13MB + Index: 0.00MB + Engine InnoDB
    sh_revslider_slides: Data: 0.41MB + Index: 0.00MB + Engine MyISAM
    sh_revslider_slides_bkp: Data: 1.52MB + Index: 0.00MB + Engine InnoDB
    sh_revslider_static_slides: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    sh_revslider_static_slides_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_shortpixel_queue: Data: 0.20MB + Index: 0.44MB + Engine InnoDB
    sh_termmeta: Data: 0.01MB + Index: 0.02MB + Engine MyISAM
    sh_terms: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    sh_term_relationships: Data: 0.12MB + Index: 0.25MB + Engine MyISAM
    sh_term_taxonomy: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    sh_tm_taskmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    sh_tm_tasks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_usermeta: Data: 0.19MB + Index: 0.20MB + Engine InnoDB
    sh_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    sh_wcmp_colonias: Data: 9.52MB + Index: 5.03MB + Engine InnoDB
    sh_wcmp_order_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_wcmp_reindex_products: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_wcmp_trackings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_wcmp_tracking_products: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_wcmp_user_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    sh_wc_download_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    sh_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    sh_wc_order_product_lookup: Data: 0.11MB + Index: 0.06MB + Engine InnoDB
    sh_wc_order_stats: Data: 0.09MB + Index: 0.05MB + Engine InnoDB
    sh_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    sh_wc_product_meta_lookup: Data: 0.28MB + Index: 0.55MB + Engine InnoDB
    sh_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_wc_webhooks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    sh_wfblockediplog: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_wfblocks7: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    sh_wfconfig: Data: 0.09MB + Index: 0.00MB + Engine InnoDB
    sh_wfcrawlers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_wffilechanges: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_wffilemods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_wfhits: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    sh_wfhoover: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_wfissues: Data: 0.06MB + Index: 0.06MB + Engine InnoDB
    sh_wfknownfilelist: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_wflivetraffichuman: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_wflocs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_wflogins: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    sh_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    sh_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_wfnotifications: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_wfpendingissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    sh_wfreversecache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_wfsnipcache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    sh_wfstatus: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    sh_wftrafficrates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_wt_iew_action_history: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_wt_iew_cron: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_wt_iew_ftp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_wt_iew_mapping_template: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    sh_yith_wcwl: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    sh_yith_wcwl_lists: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    
    ### Post Type Counts ###
    
    attachment: 2850
    custom_css: 3
    elementor_library: 29
    elementskit_content: 1
    ep-pointer: 1
    mailpoet_page: 1
    mega_menu: 5
    nav_menu_item: 42
    page: 42
    post: 7
    product: 1192
    product_variation: 5
    qrcode: 1
    revision: 7
    shop_coupon: 27
    shop_order: 684
    shop_order_refund: 26
    sp_wps_shortcodes: 1
    tf_custom_carriers: 1
    tf_restaurantes: 11
    wpcf7_contact_form: 2
    
    ### Security ###
    
    Secure connection (HTTPS): ?
    					Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates.
    Hide errors from visitors: ?Error messages should not be shown to visitors.
    
    ### Active Plugins (15) ###
    
    iThemes Security: by iThemes – 7.7.1
    CBX PhpSpreadSheet Library: by Codeboxr – 1.0.0
    Elementor: by Elementor.com – 2.9.13
    Kirki Customizer Framework: by Ari Stathopoulos (@aristath) – 3.0.45
    Loco Translate: by Tim Whitlock – 2.3.1
    MarketPress Features: by xpeedstudio – 1.0.2
    Show Current Template: by JOTAKI Taisuke – 0.3.3
    Preview E-mails for WooCommerce: by Digamber Pradhan – 1.6.3 – Installed version not tested with active version of WooCommerce 4.2.1
    WooCommerce: by Automattic – 4.2.1 (update to version 5.3.0 is available)
    Agregar a la Lista de deseos: by YITH – 3.0.6 – Installed version not tested with active version of WooCommerce 4.2.1
    
    ### Inactive Plugins (7) ###
    
    Akismet Anti-Spam: by Automattic – 4.1.3
    Contact Form 7: by Takayuki Miyoshi – 5.1.6
    ElementsKit Lite: by Wpmet – 1.4.5
    Slider Revolution: by ThemePunch – 6.1.5
    Unyson: by ThemeFuse – 2.7.22
    WooCommerce Smart Coupons: by StoreApps – 4.1.2 – Installed version not tested with active version of WooCommerce 4.2.1
    Wp Social - Login, Share, Counter: by Wpmet – 1.3.4
    
    ### Settings ###
    
    API Enabled: ?
    Force SSL: –
    Currency: MXN ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to WooCommerce.com: –
    
    ### WC Pages ###
    
    Shop base: #4 - /shop/
    Cart: #5 - /carrito/
    Checkout: #6 - /checkout/
    My account: #7 - /mi-cuenta/
    Terms and conditions: ? Page not set
    
    ### Theme ###
    
    Name: Hey Shop Child
    Version: 1.0.0
    Author URL: 
    Child Theme: ?
    Parent Theme Name: Hey Shop Theme
    Parent Theme Version: 1.0.0
    Parent Theme Author URL: 
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: hey-child/woocommerce/archive-product.php
    hey-child/woocommerce/cart/cart-empty.php
    hey-child/woocommerce/cart/cart-totals.php
    hey-child/woocommerce/cart/cart.php
    hey-child/woocommerce/cart/proceed-to-checkout-button.php
    hey-child/woocommerce/checkout/cart-errors.php
    hey-child/woocommerce/checkout/form-checkout.php
    hey-child/woocommerce/checkout/form-coupon.php
    hey-child/woocommerce/checkout/payment-method.php
    hey-child/woocommerce/checkout/payment.php
    hey-child/woocommerce/checkout/review-order.php
    hey-child/woocommerce/checkout/thankyou.php
    hey-child/woocommerce/content-product.php
    hey-child/woocommerce/content-single-product.php
    hey-child/woocommerce/emails/admin-cancelled-order.php
    hey-child/woocommerce/emails/admin-failed-order.php
    hey-child/woocommerce/emails/admin-new-order.php
    hey-child/woocommerce/emails/customer-completed-order.php
    hey-child/woocommerce/emails/customer-invoice.php
    hey-child/woocommerce/emails/customer-new-account.php
    hey-child/woocommerce/emails/customer-note.php
    hey-child/woocommerce/emails/customer-on-hold-order.php
    hey-child/woocommerce/emails/customer-processing-order.php
    hey-child/woocommerce/emails/customer-refunded-order.php
    hey-child/woocommerce/emails/customer-reset-password.php
    hey-child/woocommerce/emails/email-addresses.php
    hey-child/woocommerce/emails/email-customer-details.php
    hey-child/woocommerce/emails/email-downloads.php
    hey-child/woocommerce/emails/email-footer.php
    hey-child/woocommerce/emails/email-header.php
    hey-child/woocommerce/emails/email-order-details.php
    hey-child/woocommerce/emails/email-order-items.php
    hey-child/woocommerce/emails/email-styles.php
    hey-child/woocommerce/global/breadcrumb.php
    hey-child/woocommerce/global/quantity-input.php
    hey-child/woocommerce/global/wrapper-end.php
    hey-child/woocommerce/global/wrapper-start.php
    hey-child/woocommerce/loop/add-to-cart.php
    hey-child/woocommerce/loop/loop-end.php
    hey-child/woocommerce/loop/loop-start.php
    hey-child/woocommerce/loop/no-products-found.php
    hey-child/woocommerce/loop/pagination.php
    hey-child/woocommerce/myaccount/dashboard.php
    hey-child/woocommerce/myaccount/form-edit-account.php
    hey-child/woocommerce/myaccount/form-login.php
    hey-child/woocommerce/myaccount/form-lost-password.php
    hey-child/woocommerce/myaccount/form-reset-password.php
    hey-child/woocommerce/myaccount/my-account.php
    hey-child/woocommerce/myaccount/my-address.php
    hey-child/woocommerce/myaccount/navigation.php
    hey-child/woocommerce/myaccount/orders.php
    hey-child/woocommerce/myaccount/view-order.php
    hey-child/woocommerce/notices/error.php
    hey-child/woocommerce/notices/notice.php
    hey-child/woocommerce/notices/success.php
    hey-child/woocommerce/order/order-details.php
    hey-child/woocommerce/product-searchform.php
    hey-child/woocommerce/single-product/add-to-cart/simple.php
    hey-child/woocommerce/single-product/add-to-cart/variable.php
    hey-child/woocommerce/single-product/add-to-cart/variation-add-to-cart-button.php
    hey-child/woocommerce/single-product/add-to-cart/variation.php
    hey-child/woocommerce/single-product/meta.php
    hey-child/woocommerce/single-product/price.php
    hey-child/woocommerce/single-product/product-attributes.php
    hey-child/woocommerce/single-product/product-image.php
    hey-child/woocommerce/single-product/rating.php
    hey-child/woocommerce/single-product/related.php
    hey-child/woocommerce/single-product/short-description.php
    hey-child/woocommerce/single-product/stock.php
    hey-child/woocommerce/single-product/tabs/tabs.php
    hey-child/woocommerce/single-product/title.php
    hey-child/woocommerce/single-product-reviews.php
    hey-child/woocommerce/single-product.php
    
    ### Action Scheduler ###
    
    Complete: 31
    Oldest: 2021-04-26 16:26:02 -0500
    Newest: 2021-05-24 16:41:42 -0500
    
    
    Thread Starter mauricionieto1994

    (@mauricionieto1994)

    @bcworkz Thank you for your help.

    I ended up making it work through my 1st method mentioned. I was able to properly identify the main query through the “pre_get_posts” filter.

    I defined the $query->set( 'post__in' , $a ); clause so I only get the IDs I want.

    Plus I unsetted some other vars to lighten the query, since ElasticSearch does the heavylifting for me.

    
    $query->set('meta_query' , []);
    $query->set('tax_query' , []);
    $query->set('meta_key' , []);
    $query->set('orderby' , '');
    unset($query->query_vars['s']);
    

    Then I rearanged the order (as to not defeat the purpose of ElasticSearch) so that the products showed up in the order I included them in the post__in clause with this:

    $query->set('orderby' , 'post__in');

    This entire implementation is quite finicky , requiring multiple filters to make it work, but it seems to be working so far.

    Thanks for your help.

    Thread Starter mauricionieto1994

    (@mauricionieto1994)

    @bcworkz Thank you for your reply.

    Just today I did try to add a hidden input field on the searchbar, but I couldn’t find it at least on the $wp_query global, so perhaps I should look into the $_REQUEST object instead.

    My issue is, wouldn’t the value on the $_REQUEST object persevere thorought the execution of the petition? Hence I’m in the same problem of not knowing if I am affecting the proper Query? Which would leave me having to check the priority of all the hooks I have to know that I affect only the main query?

    Thanks for taking the time to read my post.

    Thread Starter mauricionieto1994

    (@mauricionieto1994)

    @tellyworth Sorry if I used the wrong forum for this.

    Concerning your response, on my site, that is not the case. WP_DEBUG is false.

    I am looking at the code of wp-db.php and I do see a way for this to be printed on a method called bail(). This is the full snippet.

    // We weren't able to reconnect, so we better bail.
    $this->bail( $message, 'db_connect_fail' );
    
    // Call dead_db() if bail didn't die, because this database is no more.
    // It has ceased to be (at least temporarily).
    dead_db();

    If the process dies inside the bail, wether WP_DEBUG is true or false, it does print the host on the front. This rarely happens but it does, most of the time it ends on dead_db(), and then nothing gets printed.

    Thread Starter mauricionieto1994

    (@mauricionieto1994)

    @t-p Thank you for the reply.

    The file is there, but it is not getting enqueued on default. I have to manually enqueue it or it doesnt work.

    Thread Starter mauricionieto1994

    (@mauricionieto1994)

    @riaanknoetze Thank you for your reply. I enabled authorship of products via the “author” post_type_support. So whoever creates a product is the owner of the product. Then via the API I get the post author via the product ID and compare it with the current user logged of the API.

    Thread Starter mauricionieto1994

    (@mauricionieto1994)

    @3sonsdevelopment Thank you for your response, I understand this is a bit complex of an issue. Ive found the Advanced WooCommerce group (which I was already a member of) to be quite lacking in the help of complex developments, I also joined the slack server today so I hope to get a response soon.

    I would really love to know if there are other forums you could point me to, or if you know any folk who could just give me a little more context in the topic of this question , or anyone from the gateway payment people.

    Thank you.

    Thread Starter mauricionieto1994

    (@mauricionieto1994)

    Hi there ??

    I’d recommend first getting the ID of the product by using one of the following resources:

    https://stackoverflow.com/questions/56983983/how-to-fetch-a-product-from-woocommerce-api-based-on-the-sku
    https://github.com/woocommerce/woocommerce/issues/22407
    Once you have the ID in hand, you can then run your usual CRUD updates as needed

    Alright, I have no issue with this. I just wanted to know if I was actually missing a pre-exising way of doing it.

    Thank you

Viewing 9 replies - 1 through 9 (of 9 total)