• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

"properties should not be accessed directly" issue during WooCommerce 3.0 checkout

phpwordpressobjectwoocommercecheckout


PHP Snippet 1:

    $OrderID= ( WC()->version < '2.7.0' ) ? $order->id : $order->get_id();
    $shipping_country   = (  WC()->version < '2.7.0' ) ? $order->shipping_country : $order->get_shipping_country();

Related Snippets

WooCommerce Subscriptions: Remove role on cancelled subscription

Convert PHP array into HTML tag attributes separated by spaces

Call to a member function fetch_field() on a non-object MySQLiDB

Override default Auth routes in Laravel 7

Sentry on Symfony: how to exclude `NotFoundHttpException`

Convert date and time to Jalali in Laravel

PHP Startup Unable to load dynamic library /usr/lib/php/20151012/php_mysqli.dll

Laravel PHP: multiple project run at the same time [closed]

Uploading video to Youtube using Youtube Data API V3 and Google API Client PHP -- getting 401 (unauthorized) message

Why i get wrong output for html markdown?

Fatal error: [] operator not supported for strings

Inserting Country Selection into MySQL PHP [duplicate]

Edit product hook WooCommerce

Send POST data via raw JSON with Postman

Add 2 Webcam in one page with WebcamJS

About Contact Privacy policy Terms and conditions