Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed PHP notice on other admin pages. #72

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sun
Copy link

@sun sun commented Jan 18, 2021

All Submissions:

  • Does your code follow the Extendables standards?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?

Changes proposed in this Pull Request:

Problem

  • When going to administrative editing pages of other plugins a PHP notice appears, because the Amazon Payment Gateway expects global $post object for its meta widget, but there is none:
Notice: Trying to get property 'ID' of non-object
in /wp-content/plugins/woocommerce-gateway-amazon-payments-advanced/includes/class-wc-amazon-payments-advanced-order-admin.php
on line 153

Example

  • /wp-admin/admin.php?page=webappick-manage-feeds&action=edit-feed&feed=my-feed-id

How to test the changes in this Pull Request:

  1. Install the plugin webappick-product-feed-for-woocommerce-pro.
  2. Create a new product feed.
  3. The PHP notice appears on the editing page of the product feed.

Other information:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Changelog entry

Fixed PHP notice on admin pages of other plugins.

@sun
Copy link
Author

sun commented Feb 24, 2021

Any update on this? The build error on TravisCI is not related to the change of this PR.

sun added a commit to netzstrategen/woocommerce-gateway-amazon-pay that referenced this pull request Jul 26, 2021
@sun
Copy link
Author

sun commented Feb 2, 2022

This PR is obsolete, the offending code no longer exists:

public function auth_box_render( $order, $version ) {
if ( 'v1' !== strtolower( $version ) ) {
return;
}
$actions = array(

@sun sun closed this Feb 2, 2022
@sun sun deleted the patch-1 branch February 2, 2022 11:03
@sun sun restored the patch-1 branch February 2, 2022 11:05
@sun sun reopened this Feb 2, 2022
@sun
Copy link
Author

sun commented Feb 2, 2022

Sorry, I was mistaken - the same code still exists; Git only got confused because the original files were seemingly moved around. Updated the PR for the current version.

@sun
Copy link
Author

sun commented Feb 2, 2022

The TravisCI failures and errors existed before already and are not related to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants