Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter claytybabe

    (@claytybabe)

    Thanks for getting back to me. I try to avoid using excessive plugins where I can and have not used anything like checkout field editor to make changes to WC. I tend to do things through hooks and templates.

    I just disabled all plugins bar the Woocommerce & SSL ones and still experienced the problem, so I do not believe it is third party plugin interference.

    Please see status dump:

    
    ### WordPress Environment ###
    
    WordPress address (URL): https://alphaclicks.net
    Site address (URL): https://alphaclicks.net
    WC Version: 6.7.0
    REST API Version: ? 6.7.0
    WC Blocks Version: ? 7.8.3
    Action Scheduler Version: ? 3.4.0
    Log Directory Writable: ?
    WP Version: 6.0.1
    WP Multisite: –
    WP Memory Limit: 512 MB
    WP Debug Mode: ?
    WP Cron: ?
    Language: en_US
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 7.4.28
    PHP Post Max Size: 516 MB
    PHP Time Limit: 60
    PHP Max Input Vars: 1000
    cURL Version: 7.81.0
    OpenSSL/1.1.1n
    
    SUHOSIN Installed: –
    MySQL Version: 5.6.41-84.1
    Max Upload Size: 512 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 6.7.0
    WC Database Prefix: svK_
    Total Database Size: 14.69MB
    Database Data Size: 12.13MB
    Database Index Size: 2.56MB
    svK_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    svK_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    svK_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    svK_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    svK_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    svK_woocommerce_order_itemmeta: Data: 0.11MB + Index: 0.14MB + Engine InnoDB
    svK_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    svK_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    svK_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    svK_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    svK_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    svK_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    svK_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    svK_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    svK_actionscheduler_actions: Data: 0.16MB + Index: 0.22MB + Engine InnoDB
    svK_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    svK_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    svK_actionscheduler_logs: Data: 0.11MB + Index: 0.14MB + Engine InnoDB
    svK_ce4wp_abandoned_checkout: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    svK_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    svK_comments: Data: 0.09MB + Index: 0.09MB + Engine InnoDB
    svK_e_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    svK_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    svK_options: Data: 9.05MB + Index: 0.09MB + Engine InnoDB
    svK_postmeta: Data: 1.44MB + Index: 0.64MB + Engine InnoDB
    svK_posts: Data: 0.20MB + Index: 0.06MB + Engine InnoDB
    svK_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    svK_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    svK_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    svK_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    svK_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    svK_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    svK_user_registration_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    svK_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB
    svK_wc_admin_note_actions: Data: 0.05MB + Index: 0.02MB + Engine InnoDB
    svK_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    svK_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    svK_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    svK_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    svK_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    svK_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    svK_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    svK_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    svK_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    svK_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    svK_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    svK_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    svK_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    svK_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    svK_wpforms_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    svK_wrc_caches: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    svK_wrc_relations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    
    ### Post Type Counts ###
    
    attachment: 60
    custom_css: 2
    elementor_library: 1
    page: 27
    post: 1
    product: 3
    product_variation: 6
    revision: 54
    shop_order: 124
    shop_subscription: 87
    user_registration: 1
    wp_global_styles: 1
    wpforms: 1
    
    ### Security ###
    
    Secure connection (HTTPS): ?
    Hide errors from visitors: ?Error messages should not be shown to visitors.
    
    ### Active Plugins (10) ###
    
    Akismet Anti-Spam: by Automattic – 4.2.5
    Bluehost: by Bluehost – 2.11.5
    Google Analytics for WordPress by MonsterInsights: by MonsterInsights – 8.7.0
    Jetpack: by Automattic – 11.1.2
    Really Simple SSL: by Really Simple Plugins – 5.3.2
    WooCommerce Stripe Gateway: by WooCommerce – 6.4.3
    WooCommerce Shipping & Tax: by WooCommerce – 1.26.2
    WooCommerce Subscriptions: by WooCommerce – 4.4.0
    WooCommerce: by Automattic – 6.7.0
    WPS Hide Login: by WPServeur
    NicolasKulka
    wpformation – 1.9.6
    
    ### Inactive Plugins (11) ###
    
    Acme Demo Setup: by acmethemes – 2.0.7
    Advanced Import: by AddonsPress – 1.3.7
    Creative Mail by Constant Contact: by Constant Contact – 1.5.3
    Elementor: by Elementor.com – 3.6.7
    Gutentor - Gutenberg Blocks - Page Builder for Gutenberg Editor: by Gutentor – 3.2.3
    Health Check & Troubleshooting: by The www.ads-software.com community – 1.4.5
    Hello Dolly: by Matt Mullenweg – 1.7.2
    OptinMonster: by OptinMonster Popup Builder Team – 2.8.1
    Starter Templates: by Brainstorm Force – 3.1.13
    User Menus: by Code Atlantic – 1.2.9
    WooCommerce Admin: by WooCommerce – 3.3.2
    
    ### Dropin Plugins (2) ###
    
    db-error.php: db-error.php
    maintenance.php: maintenance.php
    
    ### Must Use Plugins (2) ###
    
    Endurance Page Cache: by Mike Hansen – 2.2
    SSO: by Garth Mortensen
    Mike Hansen – 0.4
    
    ### Settings ###
    
    API Enabled: –
    Force SSL: –
    Currency: AUD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    subscription (subscription)
    variable (variable)
    variable subscription (variable-subscription)
    
    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: ?
    Enforce Approved Product Download Directories: –
    
    ### WC Pages ###
    
    Shop base: #5 - /shop/
    Cart: #6 - /cart/
    Checkout: #7 - /checkout/
    My account: ? Page ID is set
    but the page does not exist
    
    Terms and conditions: ? Page not set
    
    ### Theme ###
    
    Name: Astra Child
    Version: 1.0.0
    Author URL: https://wpastra.com/about/
    Child Theme: ?
    Parent Theme Name: Astra
    Parent Theme Version: 3.9.0
    Parent Theme Author URL: https://wpastra.com/about/?utm_source=theme_preview&utm_medium=author_link&utm_campaign=astra_theme
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: astrachild/woocommerce/cart/cart-empty.php
    astrachild/woocommerce/cart/cart-item-data.php
    astrachild/woocommerce/cart/cart-shipping.php
    astrachild/woocommerce/cart/cart-totals.php
    astrachild/woocommerce/cart/cart.php
    astrachild/woocommerce/cart/cross-sells.php
    astrachild/woocommerce/cart/mini-cart.php
    astrachild/woocommerce/cart/proceed-to-checkout-button.php
    astrachild/woocommerce/cart/shipping-calculator.php
    astrachild/woocommerce/checkout/cart-errors.php
    astrachild/woocommerce/checkout/form-billing.php
    astrachild/woocommerce/checkout/form-checkout.php
    astrachild/woocommerce/checkout/form-coupon.php
    astrachild/woocommerce/checkout/form-login.php
    astrachild/woocommerce/checkout/form-pay.php
    astrachild/woocommerce/checkout/form-shipping.php
    astrachild/woocommerce/checkout/order-receipt.php
    astrachild/woocommerce/checkout/payment-method.php
    astrachild/woocommerce/checkout/payment.php
    astrachild/woocommerce/checkout/review-order.php
    astrachild/woocommerce/checkout/terms.php
    astrachild/woocommerce/checkout/thankyou.php
    
    ### Subscriptions ###
    
    WCS_DEBUG: ? No
    Subscriptions Mode: ? Live
    Subscriptions Live URL: https://alphaclicks.net
    Subscription Statuses: wc-active: 60
    wc-pending-cancel: 5
    wc-cancelled: 22
    
    WooCommerce Account Connected: ? Yes
    Active Product Key: ? Yes
    Report Cache Enabled: ? Yes
    Cache Update Failures: ? 0 failure
    
    ### Store Setup ###
    
    Country / State: Australia — South Australia
    
    ### Subscriptions by Payment Gateway ###
    
    PayPal Standard: wc-cancelled: 2
    Stripe: wc-pending-cancel: 1
    
    ### Payment Gateway Support ###
    
    PayPal Standard: subscriptions
    gateway_scheduled_payments
    subscription_payment_method_change_customer
    subscription_cancellation
    subscription_suspension
    subscription_reactivation
    products
    refunds
    
    PayPal Reference Transactions Enabled: ? No
    Stripe: products
    refunds
    tokenization
    add_payment_method
    subscriptions
    subscription_cancellation
    subscription_suspension
    subscription_reactivation
    subscription_amount_changes
    subscription_date_changes
    subscription_payment_method_change
    subscription_payment_method_change_customer
    subscription_payment_method_change_admin
    multiple_subscriptions
    
    ### Admin ###
    
    Enabled Features: activity-panels
    analytics
    coupons
    customer-effort-score-tracks
    experimental-products-task
    experimental-import-products-task
    experimental-fashion-sample-products
    experimental-product-tour
    homescreen
    marketing
    mobile-app-banner
    navigation
    onboarding
    onboarding-tasks
    remote-inbox-notifications
    remote-free-extensions
    payment-gateway-suggestions
    shipping-label-banner
    subscriptions
    store-alerts
    transient-notices
    wc-pay-promotion
    wc-pay-welcome-page
    wc-pay-subscriptions-page
    
    Disabled Features: minified-js
    settings
    
    Daily Cron: ? Next scheduled: 2022-07-23 23:20:28 +00:00
    Options: ?
    Notes: 57
    Onboarding: completed
    
    ### Action Scheduler ###
    
    Complete: 409
    Oldest: 2022-06-23 00:49:59 +0000
    Newest: 2022-07-23 08:28:15 +0000
    
    Pending: 46
    Oldest: 2022-07-24 04:44:32 +0000
    Newest: 2022-08-22 06:23:33 +0000
    
    ### Status report information ###
    
    Generated at: 2022-07-23 08:31:40 +00:00
    

    The only fatal error between when it was working and now was:

    2022-07-14T00:47:22+00:00 CRITICAL Uncaught Error: Class 'Endurance\WP\Module\Data\Helpers\Plugin' not found in /home1/alphacm0/public_html/wp-content/plugins/bluehost-wordpress-plugin/vendor/endurance/wp-module-data/src/Listeners/Plugin.php:144
    Stack trace:
    #0 /home1/alphacm0/public_html/wp-content/plugins/bluehost-wordpress-plugin/vendor/endurance/wp-module-data/src/Listeners/Plugin.php(121): Endurance\WP\Module\Data\Listeners\Plugin->updated(Array)
    #1 /home1/alphacm0/public_html/wp-includes/class-wp-hook.php(307): Endurance\WP\Module\Data\Listeners\Plugin->installed_or_updated(Object(Plugin_Upgrader), Array)
    #2 /home1/alphacm0/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #3 /home1/alphacm0/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
    #4 /home1/alphacm0/public_html/wp-admin/includes/class-wp-upgrader.php(858): do_action('upgrader_proces...', Object(Plugin_Upgrader), Array)
    #5 /home1/alphacm0/public_html/wp-admin/includes/class-plugin-upgrader.php(231): WP_Upgrader->run(Array)
    #6 /h in /home1/alphacm0/public_html/wp-content/plugins/bluehost-wordpress-plugin/vendor/endurance/wp-module-data/src/Listeners/Plugin.php on line 144
    Thread Starter claytybabe

    (@claytybabe)

    Just got the rest of it working by calling do_action('wp_footer'); ^_^

    Thread Starter claytybabe

    (@claytybabe)

    Just called do_action('wp_head'); in the checkout template and had some success, it loaded pretty much all of the parent CSS, there still seems to be some JS missing however.

    Thread Starter claytybabe

    (@claytybabe)

    Sorry I missed a line in the get_awesome_params function, it should look like this!

    function get_awesome_params(WP_REST_Request $request) {
    //this is where you can add your own code - i.e. what happens with the keys passed in the POST request, the below just returns a response saying what the keys were to demonstrate the return.
          $parameters = $request->get_params();
          return new WP_REST_Response($parameters, 200);
    }
    Thread Starter claytybabe

    (@claytybabe)

    Hi Paul,

    I ended up using the WP inbuilt REST API, I only set it up to use the POST method and built around that (terrible practice I know but it works – I did find the response time is disgustingly slow compared to a custom built stand alone PHP API). I used this tutorial to get me on the right track: https://awhitepixel.com/blog/in-depth-guide-in-creating-and-fetching-custom-wp-rest-api-endpoints/

    Anyway, I’ll assume you have a custom child theme you’re working from.

    In your child theme:
    1. Create functions.php if you haven’t already.
    2. Add the following action and function to functions.php:

    add_action('rest_api_init', function() {
      register_rest_route('yourownpath/v1', 'post', array( //register the route to call the WP API from
        'methods' => WP_REST_SERVER::CREATABLE, //Set the method (i.e. get, post etc.) WP uses a different naming convention though
        'callback' => 'get_awesome_params',
        'args' => array(), //can be set to accept specific things other than an undefined array, ref awhitepixels api example, the empty array will accept any key passed to it so if you dont set specific args you will need to perform some sort of validation in the function below.
        'permission_callback' => function () {
          return true;
        }
      ));
    });
    
    function get_awesome_params(WP_REST_Request $request) {
    //this is where you can add your own code - i.e. what happens with the keys passed in the POST request, the below just returns a response saying what the keys were to demonstrate the return.
          return new WP_REST_Response($parameters, 200);
    }

    3. Test it:
    To consume the API you use the following address structure (in Postman for example):
    https://yourwebsite.com/wp-json/yourownpath/v1/post
    If you’re passing keys in the string (really turning it into a GET) it would be something like this:
    https://yourwebsite.comt/wp-json/yourownpath/v1/post/key1=thing&key2=otherthing

    Goodluck!

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